Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.api.views.test_raw::Tests / Python tests / test_api_raw_revision
Failed

TEST RESULT

Run At
Apr 27 2022, 11:36 PM
Details
api_client = <rest_framework.test.APIClient object at 0x7fe74978ec50> archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fe74978ecf8> revision = '2fe284620f4e5282d06b82c064cd8c8b8c09b720' def test_api_raw_revision(api_client, archive_data, revision): > _test_api_raw_hash(api_client, archive_data, revision, "rev") .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_raw.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ api_client = <rest_framework.test.APIClient object at 0x7fe74978ec50> archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fe74978ecf8> object_id = '2fe284620f4e5282d06b82c064cd8c8b8c09b720', object_ty = 'rev' def _test_api_raw_hash(api_client, archive_data, object_id, object_ty): url = reverse( "api-1-raw-object", url_args={"swhid": f"swh:1:{object_ty}:{object_id}"}, ) rv = check_http_get_response(api_client, url, status_code=200) assert rv["Content-Type"] == "application/octet-stream" assert ( rv["Content-disposition"] == f"attachment; filename=swh_1_{object_ty}_{object_id}_raw" ) sha1_git = hashlib.new("sha1", rv.content).digest() > assert sha1_git == object_id E AssertionError: assert b'/\xe2\x84b\x0fNR\x82\xd0k\x82\xc0d\xcd\x8c\x8b\x8c\t\xb7 ' == '2fe284620f4e5282d06b82c064cd8c8b8c09b720' .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_raw.py:40: AssertionError