From 5d31a0a567ae9037aa9f4148526063e06087a7a3 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Thu, 9 Jan 2025 19:15:58 +0300 Subject: [PATCH] fix: fixup previous commit --- scripts/tests/test_release_project_sync.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/tests/test_release_project_sync.py b/scripts/tests/test_release_project_sync.py index 8cc8f6f4a87..e6c55f1a2c3 100644 --- a/scripts/tests/test_release_project_sync.py +++ b/scripts/tests/test_release_project_sync.py @@ -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, } @@ -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' @@ -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'