Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #760/3541b58e backport][3.12] Fix domain tests #761

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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