Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/migrate_extrinsic_metadata/test_debian.py
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | revision = Revision( | ||||
directory=b"\xd5\x9a\x1f\x9c\x80\x9d\x8c}19P\xf6\xc8\xa2\x0f^%H\xcd\xdb", | directory=b"\xd5\x9a\x1f\x9c\x80\x9d\x8c}19P\xf6\xc8\xa2\x0f^%H\xcd\xdb", | ||||
synthetic=True, | synthetic=True, | ||||
metadata=None, | metadata=None, | ||||
parents=(b"parent " * 2,), | parents=(b"parent " * 2,), | ||||
extra_headers=(), | extra_headers=(), | ||||
) | ) | ||||
storage.revision_add([revision]) | storage.revision_add([revision]) | ||||
with pytest.raises(AssertionError, match="DSC revision with parents"): | with pytest.raises(AssertionError, match="revision with parents"): | ||||
debian_origins_from_row(revision_row, storage) | |||||
storage = copy.deepcopy(storage_before_revision) | |||||
revision = attr.evolve(revision, type=RevisionType.GIT) | |||||
storage.revision_add([revision]) | |||||
with pytest.raises(AssertionError, match="non-DSC revision"): | |||||
debian_origins_from_row(revision_row, storage) | debian_origins_from_row(revision_row, storage) | ||||
def test_debian_with_extrinsic(): | def test_debian_with_extrinsic(): | ||||
dest_original_artifacts = [ | dest_original_artifacts = [ | ||||
{ | { | ||||
"length": 2936, | "length": 2936, | ||||
"filename": "kalgebra_19.12.1-1.dsc", | "filename": "kalgebra_19.12.1-1.dsc", | ||||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |