Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_identifiers.py
Show First 20 Lines • Show All 752 Lines • ▼ Show 20 Lines | def test_dangling_branch(self): | ||||
Snapshot.from_dict(remove_id(self.dangling_branch)).id, | Snapshot.from_dict(remove_id(self.dangling_branch)).id, | ||||
self.dangling_branch["id"], | self.dangling_branch["id"], | ||||
) | ) | ||||
def test_unresolved(self): | def test_unresolved(self): | ||||
with self.assertRaisesRegex(ValueError, "b'foo' -> b'bar'"): | with self.assertRaisesRegex(ValueError, "b'foo' -> b'bar'"): | ||||
Snapshot.from_dict(remove_id(self.unresolved)) | Snapshot.from_dict(remove_id(self.unresolved)) | ||||
def test_git_object_unresolved(self): | |||||
with self.assertRaisesRegex(ValueError, "b'foo' -> b'bar'"): | |||||
git_objects.snapshot_git_object(self.unresolved) | |||||
git_objects.snapshot_git_object(self.unresolved, ignore_unresolved=True) | |||||
def test_all_types(self): | def test_all_types(self): | ||||
self.assertEqual( | self.assertEqual( | ||||
Snapshot.from_dict(remove_id(self.all_types)).id, | Snapshot.from_dict(remove_id(self.all_types)).id, | ||||
self.all_types["id"], | self.all_types["id"], | ||||
) | ) | ||||
authority_example = { | authority_example = { | ||||
▲ Show 20 Lines • Show All 571 Lines • Show Last 20 Lines |