Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Oct 12 2020, 2:08 PM
Details
tmp_path = '/tmp/pytest-of-jenkins/pytest-0/test_deposit_ko_unsupported_ta0' authenticated_client = <rest_framework.test.APIClient object at 0x7ff8f554b0f0> deposit_collection = <DepositCollection: {'id': 52, 'name': 'test'}> ready_deposit_invalid_archive = <Deposit: {'id': 40, 'reception_date': datetime.datetime(2020, 10, 12, 12, 7, 23, 163440, tzinfo=<UTC>), 'collection': 'test', 'external_id': 'external-id-invalid', 'client': 'test', 'status': 'deposited'}> def test_deposit_ko_unsupported_tarball( tmp_path, authenticated_client, deposit_collection, ready_deposit_invalid_archive ): """Deposit with an unsupported tarball should fail the checks: rejected """ deposit = ready_deposit_invalid_archive assert DEPOSIT_STATUS_DEPOSITED == deposit.status for url in private_check_url_endpoints(deposit_collection, deposit): response = authenticated_client.get(url) assert response.status_code == status.HTTP_200_OK data = response.json() assert data["status"] == DEPOSIT_STATUS_REJECTED details = data["details"] # archive checks failure assert len(details["archive"]) == 1 assert details["archive"][0]["summary"] == MANDATORY_ARCHIVE_UNSUPPORTED # metadata check failure > assert len(details["metadata"]) == 2 E assert 1 == 2 E +1 E -2 .tox/py3/lib/python3.7/site-packages/swh/deposit/tests/api/test_deposit_private_check.py:133: AssertionError