self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7f60859ab860>
swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f60838c9f98>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f6082815470>
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
TEST RESULT
TEST RESULT
- Run At
- Apr 29 2021, 11:06 AM