Skip to content

Commit

Permalink
Update tests to incorporate the completed boolean in segments
Browse files Browse the repository at this point in the history
Signed-off-by: makaveli10 <[email protected]>
  • Loading branch information
makaveli10 committed Nov 5, 2024
1 parent 81c57ae commit 8d89de2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ def test_on_message(self):
message = json.dumps({
"uid": self.client.uid,
"segments": [
{"start": 0, "end": 1, "text": "Test transcript"},
{"start": 1, "end": 2, "text": "Test transcript 2"},
{"start": 2, "end": 3, "text": "Test transcript 3"}
{"start": 0, "end": 1, "text": "Test transcript", "completed": True},
{"start": 1, "end": 2, "text": "Test transcript 2", "completed": True},
{"start": 2, "end": 3, "text": "Test transcript 3", "completed": True}
]
})
self.client.on_message(self.mock_ws_app, message)

# Assert that the transcript was updated correctly
self.assertEqual(len(self.client.transcript), 2)
self.assertEqual(len(self.client.transcript), 3)
self.assertEqual(self.client.transcript[1]['text'], "Test transcript 2")

def test_on_close(self):
Expand Down

0 comments on commit 8d89de2

Please sign in to comment.