Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/metadata_dictionary/test_gitea.py
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | def test_compute_metadata_gitea(): | ||||
"mirror_updated": "0001-01-01T00:00:00Z", | "mirror_updated": "0001-01-01T00:00:00Z", | ||||
"repo_transfer": null | "repo_transfer": null | ||||
} | } | ||||
""" | """ | ||||
result = MAPPINGS["GiteaMapping"]().translate(content) | result = MAPPINGS["GiteaMapping"]().translate(content) | ||||
assert result == { | assert result == { | ||||
"@context": CONTEXT, | "@context": CONTEXT, | ||||
"type": "forge:Repository", | "type": "forge:Repository", | ||||
"id": "https://codeberg.org/ForgeFed/ForgeFed", | |||||
"forge:forks": { | "forge:forks": { | ||||
"as:totalItems": 6, | "as:totalItems": 6, | ||||
"type": "as:OrderedCollection", | "type": "as:OrderedCollection", | ||||
}, | }, | ||||
"as:likes": { | "as:likes": { | ||||
"as:totalItems": 30, | "as:totalItems": 30, | ||||
"type": "as:Collection", | "type": "as:Collection", | ||||
}, | }, | ||||
"as:followers": { | "as:followers": { | ||||
"as:totalItems": 11, | "as:totalItems": 11, | ||||
"type": "as:Collection", | "type": "as:Collection", | ||||
}, | }, | ||||
"name": "ForgeFed", | "name": "ForgeFed", | ||||
"description": "ActivityPub-based forge federation protocol specification", | "description": "ActivityPub-based forge federation protocol specification", | ||||
"codeRepository": "https://codeberg.org/ForgeFed/ForgeFed", | "codeRepository": "https://codeberg.org/ForgeFed/ForgeFed.git", | ||||
"dateCreated": "2022-06-13T18:54:26+02:00", | "dateCreated": "2022-06-13T18:54:26+02:00", | ||||
"dateModified": "2022-09-02T03:57:22+02:00", | "dateModified": "2022-09-02T03:57:22+02:00", | ||||
"url": "https://forgefed.org", | "url": "https://forgefed.org", | ||||
} | } |