swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7fb6ec5c6a58>
def test_snapshot_resolve_alias_missing_branch(swh_storage):
missing_branch_name = b"missing_branch"
alias_name = b"rev_alias"
alias_branch = SnapshotBranch(
target=missing_branch_name, target_type=TargetType.ALIAS
)
snapshot = Snapshot(id=b"42" * 10, branches={alias_name: alias_branch,})
> swh_storage.snapshot_add([snapshot])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_snapshot.py:369:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb6ec5c6a58>
snapshots = [Snapshot(branches=ImmutableDict({b'rev_alias': SnapshotBranch(target=b'missing_branch', target_type=<TargetType.ALIAS: 'alias'>)}), id=b'42424242424242424242')]
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