swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f38695924a8>
def test_snapshot_resolve_alias_dangling_branch(swh_storage):
dangling_branch_name = b"dangling_branch"
alias_name = b"rev_alias"
alias_branch = SnapshotBranch(
target=dangling_branch_name, target_type=TargetType.ALIAS
)
snapshot = Snapshot(
branches={dangling_branch_name: None, alias_name: alias_branch,}
)
> swh_storage.snapshot_add([snapshot])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_snapshot.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7f38695924a8>
snapshots = [Snapshot(branches=ImmutableDict({b'dangling_branch': None, b'rev_alias': SnapshotBranch(target=b'dangling_branch', target_type=<TargetType.ALIAS: 'alias'>)}), id=b'\\\x81\xc2\x7f\x00"gKR.\x80\xc9\xba \xf1)2\x9b&\xbd')]
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