self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb4111b10f0>
swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb4111ada20>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb405f5c5c0>
def test_object_find_by_sha1_git(self, swh_storage, sample_data):
content = sample_data.content
directory = sample_data.directory
revision = sample_data.revision
release = sample_data.release
sha1_gits = [b"00000000000000000000"]
expected = {
b"00000000000000000000": [],
}
swh_storage.content_add([content])
sha1_gits.append(content.sha1_git)
expected[content.sha1_git] = [
{"sha1_git": content.sha1_git, "type": "content",}
]
swh_storage.directory_add([directory])
sha1_gits.append(directory.id)
expected[directory.id] = [{"sha1_git": directory.id, "type": "directory",}]
> swh_storage.revision_add([revision])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:3703:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:484: in revision_add
revisions = list(set(revisions))
<attrs generated hash swh.model.model.Revision>:15: in __hash__
self.extra_headers,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ImmutableDict({'checksums': {'sha1': 'tarball-sha1', 'sha256': 'tarball-sha256'}, 'signed-off-by': 'some-dude'})
def __hash__(self):
> return hash(tuple(sorted(self.data)))
E TypeError: unhashable type: 'dict'
.tox/py3/lib/python3.7/site-packages/swh/model/collections.py:49: TypeError
TEST RESULT
TEST RESULT
- Run At
- Apr 6 2021, 1:56 PM