diff --git a/swh/deposit/tests/api/test_collection_post_atom.py b/swh/deposit/tests/api/test_collection_post_atom.py --- a/swh/deposit/tests/api/test_collection_post_atom.py +++ b/swh/deposit/tests/api/test_collection_post_atom.py @@ -239,46 +239,6 @@ assert bool(deposit_request.archive) is False -def test_post_deposit_atom_entry_tei( - authenticated_client, deposit_collection, atom_dataset -): - """Posting initial atom entry as TEI should return 201 with receipt - - """ - # given - external_id = "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a" - with pytest.raises(Deposit.DoesNotExist): - Deposit.objects.get(external_id=external_id) - - atom_entry_data = atom_dataset["tei-sample"] - - # when - response = authenticated_client.post( - reverse(COL_IRI, args=[deposit_collection.name]), - content_type="application/atom+xml;type=entry", - data=atom_entry_data, - HTTP_SLUG=external_id, - HTTP_IN_PROGRESS="false", - ) - - # then - assert response.status_code == status.HTTP_201_CREATED - - response_content = parse_xml(BytesIO(response.content)) - deposit_id = response_content["swh:deposit_id"] - - deposit = Deposit.objects.get(pk=deposit_id) - assert deposit.collection == deposit_collection - assert deposit.external_id == external_id - assert deposit.status == DEPOSIT_STATUS_DEPOSITED - - # one associated request to a deposit - deposit_request = DepositRequest.objects.get(deposit=deposit) - assert deposit_request.metadata is not None - assert deposit_request.raw_metadata == atom_entry_data - assert bool(deposit_request.archive) is False - - def test_post_deposit_atom_entry_multiple_steps( authenticated_client, deposit_collection, atom_dataset ): diff --git a/swh/deposit/tests/data/atom/tei-sample.xml b/swh/deposit/tests/data/atom/tei-sample.xml deleted file mode 100644 --- a/swh/deposit/tests/data/atom/tei-sample.xml +++ /dev/null @@ -1 +0,0 @@ -HAL TEI export of hal-01587083CCSDDistributed under a Creative Commons Attribution 4.0 International License

HAL API platform

questionnaire software metadataMoraneGruenpeter7de56c632362954fa84172cad80afe4einria.fr1556733MoraneGruenpeterf85a43a5fb4a2e0778a77e017f28c8fdgmail.com2017-09-29 11:21:322017-10-03 17:20:132017-10-03 17:20:132017-09-292017-09-29contributorMoraneGruenpeterf85a43a5fb4a2e0778a77e017f28c8fdgmail.comCCSDhal-01587083https://hal.inria.fr/hal-01587083gruenpeter:hal-0158708320172017questionnaire software metadataMoraneGruenpeter7de56c632362954fa84172cad80afe4einria.fr1556733EnglishComputer Science [cs]SoftwareIRILLInitiative pour la Recherche et l'Innovation sur le Logiciel Libre
https://www.irill.org/
Universite Pierre et Marie Curie - Paris 6UPMC
4 place Jussieu - 75005 Paris
http://www.upmc.fr/
Institut National de Recherche en Informatique et en AutomatiqueInria
Domaine de VoluceauRocquencourt - BP 10578153 Le Chesnay Cedex
http://www.inria.fr/en/
Universite Paris Diderot - Paris 7UPD7
5 rue Thomas-Mann - 75205 Paris cedex 13
http://www.univ-paris-diderot.fr