swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f46307b5f60>
@pytest.fixture
def swh_contents(swh_storage: StorageInterface) -> Iterable[BaseContent]:
contents = [BaseContent.from_dict(c) for c in gen_contents(n=20)]
> swh_storage.content_add([c for c in contents if c.status != "absent"])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/conftest.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:237: in content_add
return self._content_add(list(contents), with_data=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7f46307b5f60>
contents = [Content(sha1=b'\xed\xa2\xe7\xd5>\x02\xb3\xea\xc9\x9b\xbf\xc7\x92\xe6\xed7\x88\xe7\xc9_', sha1_git=b'K\xe3\x19d\x86\x8...\xcc\xae\xc6\x88\xe4;\n!', ctime=datetime.datetime(2021, 4, 29, 8, 27, 24, 919404, tzinfo=datetime.timezone.utc)), ...]
with_data = True
def _content_add(self, contents: List[Content], with_data: bool) -> Dict:
# Filter-out content already in the database.
> if not self._allow_overwrite:
E AttributeError: 'InMemoryStorage' object has no attribute '_allow_overwrite'
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:155: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 29 2021, 10:28 AM