Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/api/test_collection_post_binary.py
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | ): | ||||
assert response_content["atom:deposit_archive"] == sample_archive["name"] | assert response_content["atom:deposit_archive"] == sample_archive["name"] | ||||
assert int(response_content["atom:deposit_id"]) == deposit.id | assert int(response_content["atom:deposit_id"]) == deposit.id | ||||
assert response_content["atom:deposit_status"] == deposit.status | assert response_content["atom:deposit_status"] == deposit.status | ||||
from django.urls import reverse as reverse_strict | from django.urls import reverse as reverse_strict | ||||
edit_iri = reverse_strict("edit_iri", args=[deposit_collection.name, deposit.id]) | edit_iri = reverse_strict("edit_iri", args=[deposit_collection.name, deposit.id]) | ||||
assert response._headers["location"] == ( | assert response["location"] == f"http://testserver{edit_iri}" | ||||
"Location", | |||||
"http://testserver" + edit_iri, | |||||
) | |||||
def test_post_deposit_binary_failure_unsupported_packaging_header( | def test_post_deposit_binary_failure_unsupported_packaging_header( | ||||
authenticated_client, deposit_collection, sample_archive | authenticated_client, deposit_collection, sample_archive | ||||
): | ): | ||||
"""Bin deposit without supported content_disposition header returns 400 | """Bin deposit without supported content_disposition header returns 400 | ||||
""" | """ | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |