Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_collection_post_atom::test_post_deposit_atom_with_slug_and_external_identifier
Failed

TEST RESULT

Run At
Feb 23 2022, 1:52 PM
Details
authenticated_client = <rest_framework.test.APIClient object at 0x7f7cf847fa58> deposit_collection = <DepositCollection: {'id': 28, 'name': 'test'}> deposit_user = <DepositClient: {'id': 26, 'collections': [28], 'username': 'test', 'domain': 'archives-ouvertes.fr/', 'provider_url': 'https://hal-test.archives-ouvertes.fr/'}> atom_dataset = {'codemeta-sample': '<?xml version="1.0"?>\n <entry xmlns="http://www.w3.org/2005/Atom"\n xmlns:d...ntry>\n', 'entry-data-empty-body': '<?xml version="1.0"?>\n<entry xmlns="http://www.w3.org/2005/Atom"></entry>\n', ...} mocker = <pytest_mock.plugin.MockerFixture object at 0x7f7cf84a4d68> def test_post_deposit_atom_with_slug_and_external_identifier( authenticated_client, deposit_collection, deposit_user, atom_dataset, mocker ): """Even though <external_identifier> is deprecated, it should still be allowed when it matches the slug, so that we don't break existing clients """ url = reverse(COL_IRI, args=[deposit_collection.name]) slug = str(uuid.uuid4()) # when response = post_atom( authenticated_client, url, data=atom_dataset["error-with-external-identifier"] % slug, HTTP_IN_PROGRESS="false", HTTP_SLUG=slug, ) > assert response.status_code == status.HTTP_201_CREATED E assert 400 == 201 E +400 E -201 .tox/py3/lib/python3.7/site-packages/swh/deposit/tests/api/test_collection_post_atom.py:320: AssertionError