Skip to content

Commit

Permalink
Merge pull request #760 from gerrod3/fix-python-domain-test
Browse files Browse the repository at this point in the history
Fix domain tests

(cherry picked from commit 3541b58)
  • Loading branch information
ggainey authored and patchback[bot] committed Nov 11, 2024
1 parent 4701286 commit 91e6513
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pulp_python/tests/functional/api/test_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ def test_domain_object_creation(
python_bindings.RepositoriesPythonApi.create(repo_body, pulp_domain=domain.name)
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."]
}

with pytest.raises(python_bindings.ApiException) as e:
sync_body = {"remote": default_remote.pulp_href}
python_bindings.RepositoriesPythonApi.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."]
}

with pytest.raises(python_bindings.ApiException) as e:
publish_body = {"repository": repo.pulp_href}
python_bindings.PublicationsPypiApi.create(publish_body)
assert e.value.status == 400
assert json.loads(e.value.body) == {
"non_field_errors": ["Objects must all be apart of the default domain."]
"non_field_errors": ["Objects must all be a part of the default domain."]
}

with pytest.raises(python_bindings.ApiException) as e:
Expand All @@ -78,7 +78,7 @@ def test_domain_object_creation(
python_bindings.DistributionsPypiApi.create(distro_body)
assert e.value.status == 400
assert json.loads(e.value.body) == {
"non_field_errors": ["Objects must all be apart of the default domain."]
"non_field_errors": ["Objects must all be a part of the default domain."]
}


Expand Down Expand Up @@ -113,7 +113,7 @@ def test_domain_content_upload(
python_bindings.ContentPackagesApi.create(**content_body, pulp_domain=domain.name)
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."]
}

# Now create the same content in the second domain
Expand Down

0 comments on commit 91e6513

Please sign in to comment.