Skip to content

Commit

Permalink
fix: fixup previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarIthawi committed Jan 9, 2025
1 parent 43f210f commit 5d31a0a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions scripts/tests/test_release_project_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,14 @@ def test_translations_entry_update_translation():
translation='same translation',
)

status = command.sync_translation_entry(
status, updates = command.sync_translation_entry(
translation_from_old_project, current_translation
)

assert status == 'updated'
assert status == 'update'
assert updates == {
'reviewed': True,
}
assert current_translation.updates == {
'reviewed': True,
}
Expand All @@ -201,11 +204,12 @@ def test_translations_entry_more_recent_review():
reviewed=True,
)

status = command.sync_translation_entry(
status, updates = command.sync_translation_entry(
translation_from_main_project, release_translation
)

assert status == 'no-op'
assert not updates, 'updates should be empty'
assert not release_translation.updates, 'save() should not be called'


Expand All @@ -226,11 +230,12 @@ def test_translations_entry_dry_run():
translation='same translation',
)

status = command.sync_translation_entry(
status, updates = command.sync_translation_entry(
translation_from_old_project, current_translation
)

assert status == 'updated-dry-run'
assert status == 'update-dry-run'
assert not updates, 'updates should be empty'
assert not current_translation.updates, 'save() should not be called in --dry-run mode'


Expand Down

0 comments on commit 5d31a0a

Please sign in to comment.