Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Feb 23 2022, 1:52 PM
Details
authenticated_client = <rest_framework.test.APIClient object at 0x7f3048391588> deposit_collection = <DepositCollection: {'id': 72, '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', ...} mocker = <pytest_mock.plugin.MockerFixture object at 0x7f3048c492b0> deposit_user = <DepositClient: {'id': 70, 'collections': [72], 'username': 'test', 'domain': 'archives-ouvertes.fr/', 'provider_url': 'https://hal-test.archives-ouvertes.fr/'}> sample_archive = {'data': b'PK\x03\x04\x14\x00\x00\x00\x00\x00\x02fWT\xcba\xb4c\x14\x00\x00\x00\x14\x00\x00\x00\x05\x00\x00\x00file1som...ytest-0/test_post_deposit_multipart_wi0/tmpcsop_py1', 'length': 128, 'md5sum': 'e9c0a04ebd124797b6a2cb8b7c729043', ...} def test_post_deposit_multipart_without_origin_url( authenticated_client, deposit_collection, atom_dataset, mocker, deposit_user, sample_archive, ): # given url = reverse(COL_IRI, args=[deposit_collection.name]) data_atom_entry = atom_dataset["entry-data-deposit-binary"] id_ = str(uuid.uuid4()) mocker.patch("uuid.uuid4", return_value=id_) # when response = post_multipart( authenticated_client, url, sample_archive, data_atom_entry, HTTP_IN_PROGRESS="false", ) > 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_multipart.py:78: AssertionError