Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/conftest.py
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | ): | ||||
""" | """ | ||||
deposit = create_deposit( | deposit = create_deposit( | ||||
authenticated_client, | authenticated_client, | ||||
collection_name, | collection_name, | ||||
deposit_status=DEPOSIT_STATUS_PARTIAL, | deposit_status=DEPOSIT_STATUS_PARTIAL, | ||||
**kwargs, | **kwargs, | ||||
) | ) | ||||
origin_url = deposit.client.provider_url + deposit.external_id | |||||
response = authenticated_client.post( | response = authenticated_client.post( | ||||
reverse(SE_IRI, args=[collection_name, deposit.id]), | reverse(SE_IRI, args=[collection_name, deposit.id]), | ||||
content_type="application/atom+xml;type=entry", | content_type="application/atom+xml;type=entry", | ||||
data=atom_dataset["entry-data0"], | data=atom_dataset["entry-data0"] % origin_url, | ||||
HTTP_SLUG=deposit.external_id, | |||||
HTTP_IN_PROGRESS="true", | HTTP_IN_PROGRESS="true", | ||||
) | ) | ||||
assert response.status_code == status.HTTP_201_CREATED | assert response.status_code == status.HTTP_201_CREATED | ||||
assert deposit.status == DEPOSIT_STATUS_PARTIAL | assert deposit.status == DEPOSIT_STATUS_PARTIAL | ||||
from swh.deposit.models import Deposit | from swh.deposit.models import Deposit | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |