Skip to content

Commit

Permalink
Merge pull request #761 from pulp/patchback/backports/3.12/3541b58e09…
Browse files Browse the repository at this point in the history
…4c0d716fe8c74619833e32d181a8c9/pr-760

[PR #760/3541b58e backport][3.12] Fix domain tests
  • Loading branch information
gerrod3 authored Nov 11, 2024
2 parents 4701286 + 91e6513 commit 0e0d08e
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 0e0d08e

Please sign in to comment.