Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Nov 23 2020, 12:12 PM
Details
authenticated_client = <rest_framework.test.APIClient object at 0x7fd4aff31ac8> deposit_collection = <DepositCollection: {'id': 13, 'name': 'test'}> 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', ...} def test_post_deposit_atom_with_external_identifier( authenticated_client, deposit_collection, atom_dataset ): """Posting an atom entry without a slug header should return a 400 """ url = reverse(COL_IRI, args=[deposit_collection.name]) # when response = authenticated_client.post( url, content_type="application/atom+xml;type=entry", data=atom_dataset["error-with-external-identifier"], # + headers HTTP_IN_PROGRESS="false", HTTP_SLUG="something", ) print(response.content) > assert b"The &#39;external_identifier&#39; tag is deprecated" in response.content E assert b'The &#39;external_identifier&#39; tag is deprecated' in b'<entry xmlns="http://www.w3.org/2005/Atom"\n xmlns:sword="http://purl.org/net/sword/terms/"\n xmlns:dcte...1/test/9/status/" />\n\n <sword:packaging>http://purl.org/net/sword/package/SimpleZip</sword:packaging>\n</entry>\n' E + where b'<entry xmlns="http://www.w3.org/2005/Atom"\n xmlns:sword="http://purl.org/net/sword/terms/"\n xmlns:dcte...1/test/9/status/" />\n\n <sword:packaging>http://purl.org/net/sword/package/SimpleZip</sword:packaging>\n</entry>\n' = <HttpResponse status_code=201, "application/xml">.content .tox/py3/lib/python3.7/site-packages/swh/deposit/tests/api/test_collection_post_atom.py:138: AssertionError