Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Filienko committed Apr 25, 2024
1 parent 07f00bd commit 19a8157
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/migration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ def test_build_migration_sequence_with_circular_dependency(mock_get_previous_mig
your_instance = Migration()

# Call the method to test and assert the raised ValueError with the expected message
with pytest.raises(ValueError):
your_instance.build_migration_sequence()
with pytest.raises(ValueError) as exc_info:
try:
migration_instance.build_migration_sequence()
except ValueError as ex:
assert True
pass

assert str(exc_info.value) == "Cycle detected in migration sequence for migration1"

def test_build_migration_sequence(migration_instance):
migration_sequence = migration_instance.build_migration_sequence()
Expand Down

0 comments on commit 19a8157

Please sign in to comment.