From e9491a0278bee54e996d62f8fdb191a54d3c660b Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Thu, 27 Jun 2024 11:13:32 +0000 Subject: [PATCH] Ensure repo tests of duplicate_name use the same name in the data #305 --- test/unit/repositories/test_catalogue_category.py | 2 +- test/unit/repositories/test_system.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/repositories/test_catalogue_category.py b/test/unit/repositories/test_catalogue_category.py index 67cc4528..5a9185d7 100644 --- a/test/unit/repositories/test_catalogue_category.py +++ b/test/unit/repositories/test_catalogue_category.py @@ -281,7 +281,7 @@ def test_create_with_duplicate_name_within_parent(self): self.mock_create( {**CATALOGUE_CATEGORY_IN_DATA_NON_LEAF_NO_PARENT_A, "parent_id": str(ObjectId())}, parent_catalogue_category_in_data=CATALOGUE_CATEGORY_IN_DATA_NON_LEAF_NO_PARENT_B, - duplicate_catalogue_category_in_data=CATALOGUE_CATEGORY_IN_DATA_NON_LEAF_NO_PARENT_B, + duplicate_catalogue_category_in_data=CATALOGUE_CATEGORY_IN_DATA_NON_LEAF_NO_PARENT_A, ) self.call_create_expecting_error(DuplicateRecordError) self.check_create_failed_with_exception( diff --git a/test/unit/repositories/test_system.py b/test/unit/repositories/test_system.py index 2a051308..478204be 100644 --- a/test/unit/repositories/test_system.py +++ b/test/unit/repositories/test_system.py @@ -251,7 +251,7 @@ def test_create_with_duplicate_name_within_parent(self): self.mock_create( {**SYSTEM_IN_DATA_NO_PARENT_A, "parent_id": str(ObjectId())}, parent_system_in_data=SYSTEM_IN_DATA_NO_PARENT_B, - duplicate_system_in_data=SYSTEM_IN_DATA_NO_PARENT_B, + duplicate_system_in_data=SYSTEM_IN_DATA_NO_PARENT_A, ) self.call_create_expecting_error(DuplicateRecordError) self.check_create_failed_with_exception("Duplicate system found within the parent system")