Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/testcase.py
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | def snapshot_get(self, snapshot_id): | ||||
return converters.from_snapshot(snp) | return converters.from_snapshot(snp) | ||||
def snapshot_get_branches(self, snapshot_id, branches_from='', | def snapshot_get_branches(self, snapshot_id, branches_from='', | ||||
branches_count=1000, target_types=None): | branches_count=1000, target_types=None): | ||||
snp = self.storage.snapshot_get_branches( | snp = self.storage.snapshot_get_branches( | ||||
hash_to_bytes(snapshot_id), branches_from.encode(), | hash_to_bytes(snapshot_id), branches_from.encode(), | ||||
branches_count, target_types) | branches_count, target_types) | ||||
return converters.from_snapshot(snp) | return converters.from_snapshot(snp) | ||||
def person_get(self, person_id): | |||||
person = next(self.storage.person_get([person_id])) | |||||
return converters.from_person(person) |