Changeset View
Changeset View
Standalone View
Standalone View
swh/graph/tests/test_origin_contributors.py
Show All 26 Lines | |||||
# FIXME: do not hardcode ids here; they should be dynamically loaded | # FIXME: do not hardcode ids here; they should be dynamically loaded | ||||
# from the test graph | # from the test graph | ||||
ORIGIN_CONTRIBUTORS = """\ | ORIGIN_CONTRIBUTORS = """\ | ||||
origin_SWHID,person_id | origin_SWHID,person_id | ||||
swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,0 | swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,0 | ||||
swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,2 | swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,2 | ||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,0 | |||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,null | |||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,1 | |||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,2 | |||||
""" | """ | ||||
DEANONYMIZATION_TABLE = """\ | DEANONYMIZATION_TABLE = """\ | ||||
sha256_base64,base64,escaped | sha256_base64,base64,escaped | ||||
8qhF7WQ2bmeoRbZipAaqtNw6QdOCDcpggLWCQLzITsI=,Sm9obiBEb2UgPGpkb2VAZXhhbXBsZS5vcmc+,John Doe <jdoe@example.org> | 8qhF7WQ2bmeoRbZipAaqtNw6QdOCDcpggLWCQLzITsI=,Sm9obiBEb2UgPGpkb2VAZXhhbXBsZS5vcmc+,John Doe <jdoe@example.org> | ||||
aZA9TeLhVzqVDQHQOd53UABAZYyek0tY3vTo6VSlA4U=,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5jb20+,Jane Doe <jdoe@example.com> | aZA9TeLhVzqVDQHQOd53UABAZYyek0tY3vTo6VSlA4U=,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5jb20+,Jane Doe <jdoe@example.com> | ||||
UaCrgAZBvn1LBd2sAinmdNvAX/G4sjo1aJA9GDd9UUs=,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5uZXQ+,Jane Doe <jdoe@example.net> | UaCrgAZBvn1LBd2sAinmdNvAX/G4sjo1aJA9GDd9UUs=,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5uZXQ+,Jane Doe <jdoe@example.net> | ||||
""" # noqa | """ # noqa | ||||
PERSONS = """\ | PERSONS = """\ | ||||
aZA9TeLhVzqVDQHQOd53UABAZYyek0tY3vTo6VSlA4U= | aZA9TeLhVzqVDQHQOd53UABAZYyek0tY3vTo6VSlA4U= | ||||
UaCrgAZBvn1LBd2sAinmdNvAX/G4sjo1aJA9GDd9UUs= | UaCrgAZBvn1LBd2sAinmdNvAX/G4sjo1aJA9GDd9UUs= | ||||
8qhF7WQ2bmeoRbZipAaqtNw6QdOCDcpggLWCQLzITsI= | 8qhF7WQ2bmeoRbZipAaqtNw6QdOCDcpggLWCQLzITsI= | ||||
""" | """ | ||||
DEANONYMIZED_ORIGIN_CONTRIBUTORS = """\ | DEANONYMIZED_ORIGIN_CONTRIBUTORS = """\ | ||||
origin_SWHID,person_base64,person_escaped | origin_SWHID,person_base64,person_escaped | ||||
swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5jb20+,Jane Doe <jdoe@example.com> | swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5jb20+,Jane Doe <jdoe@example.com> | ||||
swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,Sm9obiBEb2UgPGpkb2VAZXhhbXBsZS5vcmc+,John Doe <jdoe@example.org> | swh:1:ori:83404f995118bd25774f4ac14422a8f175e7a054,Sm9obiBEb2UgPGpkb2VAZXhhbXBsZS5vcmc+,John Doe <jdoe@example.org> | ||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5jb20+,Jane Doe <jdoe@example.com> | |||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,SmFuZSBEb2UgPGpkb2VAZXhhbXBsZS5uZXQ+,Jane Doe <jdoe@example.net> | |||||
swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165,Sm9obiBEb2UgPGpkb2VAZXhhbXBsZS5vcmc+,John Doe <jdoe@example.org> | |||||
""" # noqa | """ # noqa | ||||
def test_list_origin_contributors(tmpdir): | def test_list_origin_contributors(tmpdir): | ||||
tmpdir = Path(tmpdir) | tmpdir = Path(tmpdir) | ||||
topological_order_path = tmpdir / "topo_order.csv.zst" | topological_order_path = tmpdir / "topo_order.csv.zst" | ||||
origin_contributors_path = tmpdir / "origin_contributors.csv.zst" | origin_contributors_path = tmpdir / "origin_contributors.csv.zst" | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |