self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7f386e0c84a8>
swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f386e0c8da0>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f3858962588>
def test_snapshot_add_count_branches_with_filtering_edge_cases(
self, swh_storage, sample_data
):
snapshot = Snapshot(
branches={
b"\xaa\xff": SnapshotBranch(
target=sample_data.revision.id, target_type=TargetType.REVISION,
),
b"\xaa\xff\x00": SnapshotBranch(
target=sample_data.revision.id, target_type=TargetType.REVISION,
),
b"\xff\xff": SnapshotBranch(
target=sample_data.release.id, target_type=TargetType.RELEASE,
),
b"\xff\xff\x00": SnapshotBranch(
target=sample_data.release.id, target_type=TargetType.RELEASE,
),
b"dangling": None,
},
)
> swh_storage.snapshot_add([snapshot])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:3059:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7f386e0c8da0>
snapshots = [Snapshot(branches=ImmutableDict({b'\xaa\xff': SnapshotBranch(target=b'\x01\xa7\x11O6\xfd\xdd^\xf2Q\x1b,\xad\xda#zh\xa...<TargetType.RELEASE: 'release'>), b'dangling': None}), id=b'\xdfo\xb24\xb5\xf0\xcf\xe9\xd6=& \xa4g\xca\x87\xbas\x1f4')]
def snapshot_add(self, snapshots: List[Snapshot]) -> Dict:
> 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:668: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 29 2021, 10:23 AM