self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7fb6ec308908>
swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7fb60d915e48>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb622052d30>
def test_snapshot_add_get_branch_by_type(self, swh_storage, sample_data):
complete_snapshot = sample_data.snapshots[2]
snapshot = complete_snapshot.to_dict()
alias1 = b"alias1"
alias2 = b"alias2"
target1 = random.choice(list(snapshot["branches"].keys()))
target2 = random.choice(list(snapshot["branches"].keys()))
snapshot["branches"][alias2] = {
"target": target2,
"target_type": "alias",
}
snapshot["branches"][alias1] = {
"target": target1,
"target_type": "alias",
}
new_snapshot = Snapshot.from_dict(snapshot)
> swh_storage.snapshot_add([new_snapshot])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:3264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb60d915e48>
snapshots = [Snapshot(branches=ImmutableDict({b'directory': SnapshotBranch(target=b'RV\xe8V\xa0\xa0\x89\x89f\xd6\xba\x14\xfe\xb48\...gling', target_type=<TargetType.ALIAS: 'alias'>)}), id=b'\xa5l\xe2\xd8\x1c\x19\x00#\xbb\x99\xa3\xa3by0u"\xcb\x85\xf6')]
def snapshot_add(self, snapshots: List[Snapshot]) -> Dict:
> 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:665: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 22 2021, 8:33 PM