Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_api_client.TestStorageApi::test_content_add_metadata_collision
Failed

TEST RESULT

Run At
Apr 29 2021, 11:06 AM
Details
self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7f62484c4a58> swh_storage = <RemoteStorage url=mock://example.com/> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f624b85b3c8> def test_content_add_metadata_collision(self, swh_storage, sample_data): cont1 = attr.evolve(sample_data.content, data=None, ctime=now()) # create (corrupted) content with same sha1{,_git} but != sha256 sha1_git_array = bytearray(cont1.sha256) sha1_git_array[0] += 1 cont1b = attr.evolve(cont1, sha256=bytes(sha1_git_array)) with pytest.raises(HashCollision) as cm: > swh_storage.content_add_metadata([cont1, cont1b]) E Failed: DID NOT RAISE <class 'swh.storage.exc.HashCollision'> .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:361: Failed