Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/api/test_collection_post_atom.py
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | ): | ||||
response = post_atom( | response = post_atom( | ||||
authenticated_client, | authenticated_client, | ||||
url, | url, | ||||
data=atom_dataset["error-with-external-identifier"] % external_id, | data=atom_dataset["error-with-external-identifier"] % external_id, | ||||
HTTP_IN_PROGRESS="false", | HTTP_IN_PROGRESS="false", | ||||
HTTP_SLUG="something", | HTTP_SLUG="something", | ||||
) | ) | ||||
assert b"The 'external_identifier' tag is deprecated" in response.content | assert ( | ||||
b"The <external_identifier> tag and Slug header are deprecated" | |||||
in response.content | |||||
) | |||||
assert response.status_code == status.HTTP_400_BAD_REQUEST | assert response.status_code == status.HTTP_400_BAD_REQUEST | ||||
def test_post_deposit_atom_with_create_origin_and_external_identifier( | def test_post_deposit_atom_with_create_origin_and_external_identifier( | ||||
authenticated_client, deposit_collection, atom_dataset, deposit_user | authenticated_client, deposit_collection, atom_dataset, deposit_user | ||||
): | ): | ||||
"""<atom:external_identifier> was deprecated before <swh:create_origin> | """<atom:external_identifier> was deprecated before <swh:create_origin> | ||||
was introduced, clients should get an error when trying to use both | was introduced, clients should get an error when trying to use both | ||||
▲ Show 20 Lines • Show All 386 Lines • Show Last 20 Lines |