Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/api/test_collection_post_multipart.py
Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | for deposit_request in deposit_requests: | ||||
check_archive(sample_archive["name"], deposit_request.archive.name) | check_archive(sample_archive["name"], deposit_request.archive.name) | ||||
else: | else: | ||||
assert ( | assert ( | ||||
deposit_request.metadata["atom:id"] | deposit_request.metadata["atom:id"] | ||||
== "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a" | == "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a" | ||||
) | ) | ||||
assert deposit_request.raw_metadata == data_atom_entry | assert deposit_request.raw_metadata == data_atom_entry | ||||
replace_metadata_uri = response._headers["location"][1] | replace_metadata_uri = response["location"] | ||||
response = authenticated_client.put( | response = authenticated_client.put( | ||||
replace_metadata_uri, | replace_metadata_uri, | ||||
content_type="application/atom+xml;type=entry", | content_type="application/atom+xml;type=entry", | ||||
data=atom_dataset["entry-data-deposit-binary"], | data=atom_dataset["entry-data-deposit-binary"], | ||||
HTTP_IN_PROGRESS="false", | HTTP_IN_PROGRESS="false", | ||||
) | ) | ||||
assert response.status_code == status.HTTP_204_NO_CONTENT | assert response.status_code == status.HTTP_204_NO_CONTENT | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |