From c3c20dbb33b73e164bb0f2751e15457062a7b8dd Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Tue, 9 Jul 2024 08:57:51 +0000 Subject: [PATCH] Rename failed_with_message to failed_with_detail to match check #314 --- test/e2e/test_catalogue_category.py | 72 ++++++++++++++--------------- test/e2e/test_system.py | 48 +++++++++---------- 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/test/e2e/test_catalogue_category.py b/test/e2e/test_catalogue_category.py index 8c5321b0..b402d408 100644 --- a/test/e2e/test_catalogue_category.py +++ b/test/e2e/test_catalogue_category.py @@ -129,7 +129,7 @@ def check_post_catalogue_category_success(self, expected_catalogue_category_get_ assert self._post_response.status_code == 201 assert self._post_response.json() == expected_catalogue_category_get_data - def check_post_catalogue_category_failed_with_message(self, status_code: int, detail: str) -> None: + def check_post_catalogue_category_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `post_catalogue_category` gave a failed response with the expected code and error message. @@ -194,7 +194,7 @@ def test_create_with_non_leaf_parent(self): self.post_catalogue_category( {**CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_REQUIRED_VALUES_ONLY, "parent_id": parent_id} ) - self.check_post_catalogue_category_failed_with_message( + self.check_post_catalogue_category_failed_with_detail( 409, "Adding a catalogue category to a leaf parent catalogue category is not allowed" ) @@ -204,7 +204,7 @@ def test_create_with_non_existent_parent_id(self): self.post_catalogue_category( {**CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_REQUIRED_VALUES_ONLY, "parent_id": str(ObjectId())} ) - self.check_post_catalogue_category_failed_with_message( + self.check_post_catalogue_category_failed_with_detail( 422, "The specified parent catalogue category does not exist" ) @@ -214,7 +214,7 @@ def test_create_with_invalid_parent_id(self): self.post_catalogue_category( {**CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_REQUIRED_VALUES_ONLY, "parent_id": "invalid-id"} ) - self.check_post_catalogue_category_failed_with_message( + self.check_post_catalogue_category_failed_with_detail( 422, "The specified parent catalogue category does not exist" ) @@ -229,7 +229,7 @@ def test_create_with_duplicate_name_within_parent(self): self.post_catalogue_category( {**CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_REQUIRED_VALUES_ONLY, "parent_id": parent_id} ) - self.check_post_catalogue_category_failed_with_message( + self.check_post_catalogue_category_failed_with_detail( 409, "A catalogue category with the same name already exists within the parent catalogue category" ) @@ -251,14 +251,14 @@ def test_create_leaf_with_properties_with_non_existent_unit_id(self): self.add_unit_value_and_id("mm", str(ObjectId())) self.post_catalogue_category(CATALOGUE_CATEGORY_DATA_LEAF_NO_PARENT_WITH_PROPERTIES_MM) - self.check_post_catalogue_category_failed_with_message(422, "The specified unit does not exist") + self.check_post_catalogue_category_failed_with_detail(422, "The specified unit does not exist") def test_create_leaf_with_properties_with_invalid_unit_id(self): """Test creating a leaf catalogue category with a property with an invalid unit id provided.""" self.add_unit_value_and_id("mm", "invalid-id") self.post_catalogue_category(CATALOGUE_CATEGORY_DATA_LEAF_NO_PARENT_WITH_PROPERTIES_MM) - self.check_post_catalogue_category_failed_with_message(422, "The specified unit does not exist") + self.check_post_catalogue_category_failed_with_detail(422, "The specified unit does not exist") def test_create_leaf_with_duplicate_properties(self): """Test creating a leaf catalogue category with duplicate properties provided.""" @@ -268,7 +268,7 @@ def test_create_leaf_with_duplicate_properties(self): self.post_catalogue_category( {**CATALOGUE_CATEGORY_DATA_LEAF_NO_PARENT_WITH_PROPERTIES_MM, "properties": [property_data, property_data]} ) - self.check_post_catalogue_category_failed_with_message( + self.check_post_catalogue_category_failed_with_detail( 422, f"Duplicate property name: {CATALOGUE_CATEGORY_PROPERTY_DATA_BOOLEAN_MANDATORY["name"]}" ) @@ -400,7 +400,7 @@ def check_get_catalogue_category_success(self, expected_catalogue_category_get_d assert self._get_response.status_code == 200 assert self._get_response.json() == expected_catalogue_category_get_data - def check_get_catalogue_category_failed_with_message(self, status_code: int, detail: str) -> None: + def check_get_catalogue_category_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `get_catalogue_category` gave a failed response with the expected code and error message. @@ -428,13 +428,13 @@ def test_get_with_non_existent_id(self): """Test getting a catalogue category with a non-existent id.""" self.get_catalogue_category(str(ObjectId())) - self.check_get_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_get_catalogue_category_failed_with_detail(404, "Catalogue category not found") def test_get_with_invalid_id(self): """Test getting a catalogue category with an invalid id.""" self.get_catalogue_category("invalid-id") - self.check_get_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_get_catalogue_category_failed_with_detail(404, "Catalogue category not found") class GetBreadcrumbsDSL(GetDSL): @@ -509,7 +509,7 @@ def check_get_catalogue_categories_breadcrumbs_success( "full_trail": expected_full_trail, } - def check_get_catalogue_categories_breadcrumbs_failed_with_message(self, status_code: int, detail: str) -> None: + def check_get_catalogue_categories_breadcrumbs_failed_with_detail(self, status_code: int, detail: str) -> None: """Checks that a prior call to `get_catalogue_category_breadcrumbs` gave a failed response with the expected code and error message. @@ -564,13 +564,13 @@ def test_get_breadcrumbs_with_non_existent_id(self): """Test getting a system's breadcrumbs when given a non-existent system id.""" self.get_catalogue_category_breadcrumbs(str(ObjectId())) - self.check_get_catalogue_categories_breadcrumbs_failed_with_message(404, "Catalogue category not found") + self.check_get_catalogue_categories_breadcrumbs_failed_with_detail(404, "Catalogue category not found") def test_get_breadcrumbs_with_invalid_id(self): """Test getting a system's breadcrumbs when given an invalid system id.""" self.get_catalogue_category_breadcrumbs("invalid_id") - self.check_get_catalogue_categories_breadcrumbs_failed_with_message(404, "Catalogue category not found") + self.check_get_catalogue_categories_breadcrumbs_failed_with_detail(404, "Catalogue category not found") class ListDSL(GetBreadcrumbsDSL): @@ -788,7 +788,7 @@ def check_patch_catalogue_category_response_success(self, expected_catalogue_cat E2ETestHelpers.check_created_and_modified_times_updated_correctly(self._post_response, self._patch_response) - def check_patch_catalogue_category_failed_with_message(self, status_code: int, detail: str) -> None: + def check_patch_catalogue_category_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `patch_catalogue_category` gave a failed response with the expected code and error message. @@ -857,7 +857,7 @@ def test_partial_update_parent_id_to_one_with_a_duplicate_name(self): ) self.patch_catalogue_category(catalogue_category_id, {"parent_id": parent_id}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "A catalogue category with the same name already exists within the parent catalogue category" ) @@ -866,7 +866,7 @@ def test_partial_update_parent_id_to_child_of_self(self): catalogue_category_ids = self.post_nested_catalogue_categories(2) self.patch_catalogue_category(catalogue_category_ids[0], {"parent_id": catalogue_category_ids[1]}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 422, "Cannot move a catalogue category to one of its own children" ) @@ -877,7 +877,7 @@ def test_partial_update_parent_id_to_leaf(self): catalogue_category_id = self.post_catalogue_category(CATALOGUE_CATEGORY_POST_DATA_LEAF_REQUIRED_VALUES_ONLY) self.patch_catalogue_category(catalogue_category_id, {"parent_id": parent_id}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "Adding a catalogue category to a leaf parent catalogue category is not allowed" ) @@ -886,7 +886,7 @@ def test_partial_update_parent_id_to_non_existent(self): catalogue_category_id = self.post_catalogue_category(CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_REQUIRED_VALUES_ONLY) self.patch_catalogue_category(catalogue_category_id, {"parent_id": str(ObjectId())}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 422, "The specified parent catalogue category does not exist" ) @@ -895,7 +895,7 @@ def test_partial_update_parent_id_to_invalid_id(self): catalogue_category_id = self.post_catalogue_category(CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_REQUIRED_VALUES_ONLY) self.patch_catalogue_category(catalogue_category_id, {"parent_id": "invalid-id"}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 422, "The specified parent catalogue category does not exist" ) @@ -909,7 +909,7 @@ def test_partial_update_name_to_duplicate(self): self.patch_catalogue_category( catalogue_category_id, {"name": CATALOGUE_CATEGORY_POST_DATA_NON_LEAF_NO_PARENT_NO_PROPERTIES_A["name"]} ) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "A catalogue category with the same name already exists within the parent catalogue category" ) @@ -982,7 +982,7 @@ def test_partial_update_non_leaf_to_leaf_when_has_child_catalogue_category(self) self.patch_catalogue_category(catalogue_category_id, {"is_leaf": True}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements and cannot be updated" ) @@ -1027,7 +1027,7 @@ def test_partial_update_leaf_to_non_leaf_when_has_child_catalogue_item(self): self.patch_catalogue_category(catalogue_category_id, {"is_leaf": False}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements and cannot be updated" ) @@ -1039,7 +1039,7 @@ def test_partial_update_leaf_properties_when_has_child_catalogue_item(self): self.patch_catalogue_category(catalogue_category_id, {"properties": []}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements and cannot be updated" ) @@ -1082,7 +1082,7 @@ def test_partial_update_is_leaf_with_child_catalogue_category(self): ) self.patch_catalogue_category(catalogue_category_id, {"is_leaf": True}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements and cannot be updated" ) @@ -1111,7 +1111,7 @@ def test_partial_update_leaf_with_properties_with_non_existent_unit_id(self): self.patch_catalogue_category( catalogue_category_id, {"properties": [CATALOGUE_CATEGORY_PROPERTY_DATA_NUMBER_NON_MANDATORY_WITH_MM_UNIT]} ) - self.check_patch_catalogue_category_failed_with_message(422, "The specified unit does not exist") + self.check_patch_catalogue_category_failed_with_detail(422, "The specified unit does not exist") def test_partial_update_leaf_with_properties_with_invalid_unit_id(self): """Test updating a leaf catalogue category's properties to have a property with an invalid unit id provided.""" @@ -1121,7 +1121,7 @@ def test_partial_update_leaf_with_properties_with_invalid_unit_id(self): self.patch_catalogue_category( catalogue_category_id, {"properties": [CATALOGUE_CATEGORY_PROPERTY_DATA_NUMBER_NON_MANDATORY_WITH_MM_UNIT]} ) - self.check_patch_catalogue_category_failed_with_message(422, "The specified unit does not exist") + self.check_patch_catalogue_category_failed_with_detail(422, "The specified unit does not exist") def test_partial_update_leaf_with_duplicate_properties(self): """Test updating a leaf catalogue category with duplicate properties provided.""" @@ -1130,7 +1130,7 @@ def test_partial_update_leaf_with_duplicate_properties(self): catalogue_category_id = self.post_catalogue_category(CATALOGUE_CATEGORY_POST_DATA_LEAF_NO_PARENT_NO_PROPERTIES) self.patch_catalogue_category(catalogue_category_id, {"properties": [property_data, property_data]}) - self.check_patch_catalogue_category_failed_with_message( + self.check_patch_catalogue_category_failed_with_detail( 422, f"Duplicate property name: {CATALOGUE_CATEGORY_PROPERTY_DATA_BOOLEAN_MANDATORY["name"]}" ) @@ -1253,13 +1253,13 @@ def test_partial_update_with_non_existent_id(self): """Test updating a non-existent catalogue category.""" self.patch_catalogue_category(str(ObjectId()), {}) - self.check_patch_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_patch_catalogue_category_failed_with_detail(404, "Catalogue category not found") def test_partial_update_invalid_id(self): """Test updating a catalogue category with an invalid id.""" self.patch_catalogue_category("invalid-id", {}) - self.check_patch_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_patch_catalogue_category_failed_with_detail(404, "Catalogue category not found") class DeleteDSL(UpdateDSL): @@ -1282,7 +1282,7 @@ def check_delete_catalogue_category_success(self) -> None: assert self._delete_response.status_code == 204 - def check_delete_catalogue_category_failed_with_message(self, status_code: int, detail: str) -> None: + def check_delete_catalogue_category_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `delete_catalogue_category` gave a failed response with the expected code and error message. @@ -1306,14 +1306,14 @@ def test_delete(self): self.check_delete_catalogue_category_success() self.get_catalogue_category(catalogue_category_id) - self.check_get_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_get_catalogue_category_failed_with_detail(404, "Catalogue category not found") def test_delete_with_child_catalogue_category(self): """Test deleting a catalogue category with a child catalogue category.""" catalogue_category_ids = self.post_nested_catalogue_categories(2) self.delete_catalogue_category(catalogue_category_ids[0]) - self.check_delete_catalogue_category_failed_with_message( + self.check_delete_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements and cannot be deleted" ) @@ -1324,7 +1324,7 @@ def test_delete_with_child_item(self): self.post_child_catalogue_item() self.delete_catalogue_category(catalogue_category_id) - self.check_delete_catalogue_category_failed_with_message( + self.check_delete_catalogue_category_failed_with_detail( 409, "Catalogue category has child elements and cannot be deleted" ) @@ -1332,10 +1332,10 @@ def test_delete_with_non_existent_id(self): """Test deleting a non-existent catalogue category.""" self.delete_catalogue_category(str(ObjectId())) - self.check_delete_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_delete_catalogue_category_failed_with_detail(404, "Catalogue category not found") def test_delete_with_invalid_id(self): """Test deleting a catalogue category with an invalid id.""" self.delete_catalogue_category("invalid_id") - self.check_delete_catalogue_category_failed_with_message(404, "Catalogue category not found") + self.check_delete_catalogue_category_failed_with_detail(404, "Catalogue category not found") diff --git a/test/e2e/test_system.py b/test/e2e/test_system.py index 3c748f01..03ceed5e 100644 --- a/test/e2e/test_system.py +++ b/test/e2e/test_system.py @@ -63,7 +63,7 @@ def check_post_system_success(self, expected_system_get_data: dict) -> None: assert self._post_response.status_code == 201 assert self._post_response.json() == expected_system_get_data - def check_post_system_failed_with_message(self, status_code: int, detail: str) -> None: + def check_post_system_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `post_system` gave a failed response with the expected code and error message. @@ -113,13 +113,13 @@ def test_create_with_non_existent_parent_id(self): """Test creating a system with a non-existent parent id.""" self.post_system({**SYSTEM_POST_DATA_REQUIRED_VALUES_ONLY, "parent_id": str(ObjectId())}) - self.check_post_system_failed_with_message(422, "The specified parent system does not exist") + self.check_post_system_failed_with_detail(422, "The specified parent system does not exist") def test_create_with_invalid_parent_id(self): """Test creating a system with an invalid parent id.""" self.post_system({**SYSTEM_POST_DATA_REQUIRED_VALUES_ONLY, "parent_id": "invalid-id"}) - self.check_post_system_failed_with_message(422, "The specified parent system does not exist") + self.check_post_system_failed_with_detail(422, "The specified parent system does not exist") def test_create_with_duplicate_name_within_parent(self): """Test creating a system with the same name as another within the parent system.""" @@ -128,7 +128,7 @@ def test_create_with_duplicate_name_within_parent(self): # 2nd post should be the duplicate self.post_system({**SYSTEM_POST_DATA_REQUIRED_VALUES_ONLY, "parent_id": parent_id}) self.post_system({**SYSTEM_POST_DATA_REQUIRED_VALUES_ONLY, "parent_id": parent_id}) - self.check_post_system_failed_with_message( + self.check_post_system_failed_with_detail( 409, "A system with the same name already exists within the parent system" ) @@ -164,7 +164,7 @@ def check_get_system_success(self, expected_system_get_data: dict): assert self._get_response.status_code == 200 assert self._get_response.json() == expected_system_get_data - def check_get_system_failed_with_message(self, status_code: int, detail: str): + def check_get_system_failed_with_detail(self, status_code: int, detail: str): """ Checks that a prior call to `get_system` gave a failed response with the expected code and error message. @@ -190,13 +190,13 @@ def test_get_with_non_existent_id(self): """Test getting a system with a non-existent id.""" self.get_system(str(ObjectId())) - self.check_get_system_failed_with_message(404, "System not found") + self.check_get_system_failed_with_detail(404, "System not found") def test_get_with_invalid_id(self): """Test getting a system with an invalid id.""" self.get_system("invalid-id") - self.check_get_system_failed_with_message(404, "System not found") + self.check_get_system_failed_with_detail(404, "System not found") class GetBreadcrumbsDSL(GetDSL): @@ -265,7 +265,7 @@ def check_get_system_breadcrumbs_success(self, expected_trail_length: int, expec "full_trail": expected_full_trail, } - def check_get_system_breadcrumbs_failed_with_message(self, status_code: int, detail: str) -> None: + def check_get_system_breadcrumbs_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `get_system_breadcrumbs` gave a failed response with the expected code and error message. @@ -321,13 +321,13 @@ def test_get_breadcrumbs_with_non_existent_id(self): """Test getting a system's breadcrumbs when given a non-existent system id.""" self.get_system_breadcrumbs(str(ObjectId())) - self.check_get_system_breadcrumbs_failed_with_message(404, "System not found") + self.check_get_system_breadcrumbs_failed_with_detail(404, "System not found") def test_get_breadcrumbs_with_invalid_id(self): """Test getting a system's breadcrumbs when given an invalid system id.""" self.get_system_breadcrumbs("invalid_id") - self.check_get_system_breadcrumbs_failed_with_message(404, "System not found") + self.check_get_system_breadcrumbs_failed_with_detail(404, "System not found") class ListDSL(GetBreadcrumbsDSL): @@ -447,7 +447,7 @@ def check_patch_system_response_success(self, expected_system_get_data: dict) -> E2ETestHelpers.check_created_and_modified_times_updated_correctly(self._post_response, self._patch_response) - def check_patch_system_failed_with_message(self, status_code: int, detail: str) -> None: + def check_patch_system_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `patch_system` gave a failed response with the expected code and error message. @@ -489,7 +489,7 @@ def test_partial_update_parent_id_to_one_with_a_duplicate_name(self): system_id = self.post_system({**SYSTEM_POST_DATA_ALL_VALUES_NO_PARENT, "name": "Conflicting Name"}) self.patch_system(system_id, {"parent_id": parent_id}) - self.check_patch_system_failed_with_message( + self.check_patch_system_failed_with_detail( 409, "A system with the same name already exists within the parent system" ) @@ -498,21 +498,21 @@ def test_partial_update_parent_id_to_child_of_self(self): system_ids = self.post_nested_systems(2) self.patch_system(system_ids[0], {"parent_id": system_ids[1]}) - self.check_patch_system_failed_with_message(422, "Cannot move a system to one of its own children") + self.check_patch_system_failed_with_detail(422, "Cannot move a system to one of its own children") def test_partial_update_parent_id_to_non_existent(self): """Test updating the parent_id of a system to a non-existent system.""" system_id = self.post_system(SYSTEM_POST_DATA_ALL_VALUES_NO_PARENT) self.patch_system(system_id, {"parent_id": str(ObjectId())}) - self.check_patch_system_failed_with_message(422, "The specified parent system does not exist") + self.check_patch_system_failed_with_detail(422, "The specified parent system does not exist") def test_partial_update_parent_id_to_invalid_id(self): """Test updating the parent_id of a system to an invalid id.""" system_id = self.post_system(SYSTEM_POST_DATA_ALL_VALUES_NO_PARENT) self.patch_system(system_id, {"parent_id": "invalid-id"}) - self.check_patch_system_failed_with_message(422, "The specified parent system does not exist") + self.check_patch_system_failed_with_detail(422, "The specified parent system does not exist") def test_partial_update_name_to_duplicate(self): """Test updating the name of a system to conflict with a pre-existing one.""" @@ -520,7 +520,7 @@ def test_partial_update_name_to_duplicate(self): self.post_system(SYSTEM_POST_DATA_REQUIRED_VALUES_ONLY) system_id = self.post_system(SYSTEM_POST_DATA_ALL_VALUES_NO_PARENT) self.patch_system(system_id, {"name": SYSTEM_POST_DATA_REQUIRED_VALUES_ONLY["name"]}) - self.check_patch_system_failed_with_message( + self.check_patch_system_failed_with_detail( 409, "A system with the same name already exists within the parent system" ) @@ -538,13 +538,13 @@ def test_partial_update_with_non_existent_id(self): """Test updating a non-existent system.""" self.patch_system(str(ObjectId()), {}) - self.check_patch_system_failed_with_message(404, "System not found") + self.check_patch_system_failed_with_detail(404, "System not found") def test_partial_update_invalid_id(self): """Test updating a system with an invalid id.""" self.patch_system("invalid-id", {}) - self.check_patch_system_failed_with_message(404, "System not found") + self.check_patch_system_failed_with_detail(404, "System not found") class DeleteDSL(UpdateDSL): @@ -566,7 +566,7 @@ def check_delete_system_success(self) -> None: assert self._delete_response.status_code == 204 - def check_delete_system_failed_with_message(self, status_code: int, detail: str) -> None: + def check_delete_system_failed_with_detail(self, status_code: int, detail: str) -> None: """ Checks that a prior call to `delete_system` gave a failed response with the expected code and error message. @@ -590,7 +590,7 @@ def test_delete(self): self.check_delete_system_success() self.get_system(system_id) - self.check_get_system_failed_with_message(404, "System not found") + self.check_get_system_failed_with_detail(404, "System not found") def test_delete_with_child_system(self): """Test deleting a system with a child system.""" @@ -598,7 +598,7 @@ def test_delete_with_child_system(self): system_ids = self.post_nested_systems(2) self.delete_system(system_ids[0]) - self.check_delete_system_failed_with_message(409, "System has child elements and cannot be deleted") + self.check_delete_system_failed_with_detail(409, "System has child elements and cannot be deleted") def test_delete_with_child_item(self): """Test deleting a system with a child system.""" @@ -654,16 +654,16 @@ def test_delete_with_child_item(self): # pylint: enable=duplicate-code self.delete_system(system_id) - self.check_delete_system_failed_with_message(409, "System has child elements and cannot be deleted") + self.check_delete_system_failed_with_detail(409, "System has child elements and cannot be deleted") def test_delete_with_non_existent_id(self): """Test deleting a non-existent system.""" self.delete_system(str(ObjectId())) - self.check_delete_system_failed_with_message(404, "System not found") + self.check_delete_system_failed_with_detail(404, "System not found") def test_delete_with_invalid_id(self): """Test deleting a system with an invalid id.""" self.delete_system("invalid_id") - self.check_delete_system_failed_with_message(404, "System not found") + self.check_delete_system_failed_with_detail(404, "System not found")