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:01 AM
Details
self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7f525117f2e8> swh_storage = <RemoteStorage url=mock://example.com/> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f5250c61978> 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