From a2c4c2fa09bbfa5bba98cd8352cfe4aa45cd0e49 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Wed, 13 Nov 2024 11:44:57 -0300 Subject: [PATCH] Fix regression on error-msg matching on functests The error message comes from pulpcore and contained a typo. When it was fixed [0], our test failed to match. Ideally we would want to have Error Codes, but at this point it would be too costly to implement that. [0] https://github.com/pulp/pulpcore/pull/5935 (cherry picked from commit 3aa431037ae939c4eb0d6be58911f1101f931144) --- pulp_rpm/tests/functional/api/test_domains.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulp_rpm/tests/functional/api/test_domains.py b/pulp_rpm/tests/functional/api/test_domains.py index 2e465ac37..fed161543 100644 --- a/pulp_rpm/tests/functional/api/test_domains.py +++ b/pulp_rpm/tests/functional/api/test_domains.py @@ -161,7 +161,7 @@ def test_object_creation( assert e.value.status == 400 # What key should this error be under? non-field-errors seems wrong assert json.loads(e.value.body) == { - "non_field_errors": [f"Objects must all be apart of the {domain_name} domain."] + "non_field_errors": [f"Objects must all be a part of the {domain_name} domain."] } with pytest.raises(ApiException) as e: @@ -169,7 +169,7 @@ def test_object_creation( rpm_repository_api.sync(repo.pulp_href, sync_body) assert e.value.status == 400 assert json.loads(e.value.body) == { - "non_field_errors": [f"Objects must all be apart of the {domain_name} domain."] + "non_field_errors": [f"Objects must all be a part of the {domain_name} domain."] }