swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7fb62e98ec88>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb62e98e8d0>
def test_validating_proxy_storage_revision(swh_storage, sample_data):
sample_revision = sample_data.revision
id_ = hash_to_hex(sample_revision.id)
assert swh_storage.revision_missing([sample_revision.id]) == [sample_revision.id]
with pytest.raises(StorageArgumentException, match=f"should be {id_}"):
s = swh_storage.revision_add([attr.evolve(sample_revision, id=b"a" * 20)])
assert swh_storage.revision_missing([sample_revision.id]) == [sample_revision.id]
> s = swh_storage.revision_add([sample_revision])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_validate.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/validate.py:63: in revision_add
return self.storage.revision_add(revisions)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb62e98e748>
revisions = [Revision(message=b'hello', author=Person(fullname=b'Nicolas Dandrimont <nicolas@example.com> ', name=b'Nicolas Dandri...bb\x12', extra_headers=((b'gpgsig', b'test123'), (b'mergetag', b'foo\\bar'), (b'mergetag', b'"\xaf\x89\x80\x01\x00')))]
def revision_add(self, revisions: List[Revision]) -> Dict:
# Filter-out revisions already in the database
> if self._check_missing:
E AttributeError: 'InMemoryStorage' object has no attribute '_check_missing'
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:523: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 22 2021, 8:33 PM