Skip to content

Commit

Permalink
test: fix sql_entries_v2 test
Browse files Browse the repository at this point in the history
  • Loading branch information
kod-kristoff committed Mar 28, 2022
1 parent 564c4e4 commit f35f158
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion karp/tests/integration/test_sql_entries_uow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest import mock

import pytest
import ulid

from karp.foundation.events import EventBus
from karp import lex
Expand Down Expand Up @@ -83,5 +84,6 @@ def test_repo_table_name(
entry_uow = sql_entry_uow_v2_creator(
**example_uow.dict(exclude={'repository_type'})
)
random_part = ulid.from_uuid(entry_uow.entity_id).randomness().str
with entry_uow as uw:
assert uw.repo.history_model.__tablename__ == f'{example_uow.name}_{example_uow.entity_id.hex}'
assert uw.repo.history_model.__tablename__ == f'{example_uow.name}_{random_part}'

0 comments on commit f35f158

Please sign in to comment.