Skip to content

Commit

Permalink
PR: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evanderiel committed Dec 11, 2023
1 parent 8863a38 commit 2d764d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aana/tests/db/datastore/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,17 @@ def test_save_captions(mock_session):
__root__=[Caption(__root__=caption) for caption in captions]
)
timestamps = [0.1, 0.2, 0.3]
frame_ids = [0, 1, 2]

ids = save_captions_batch(media_ids, models, captions_list, timestamps)
ids = save_captions_batch(media_ids, models, captions_list, timestamps, frame_ids)

assert (
len(ids)
== len(captions_list)
== len(timestamps)
== len(models)
== len(media_ids)
== len(frame_ids)
)
mock_session.context_var.add_all.assert_called_once()
mock_session.context_var.commit.assert_called_once()

0 comments on commit 2d764d3

Please sign in to comment.