Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/storage_data.py
Show All 13 Lines | from swh.model.model import ( | ||||
Content, | Content, | ||||
Directory, | Directory, | ||||
DirectoryEntry, | DirectoryEntry, | ||||
MetadataAuthority, | MetadataAuthority, | ||||
MetadataAuthorityType, | MetadataAuthorityType, | ||||
MetadataFetcher, | MetadataFetcher, | ||||
MetadataTargetType, | MetadataTargetType, | ||||
Origin, | Origin, | ||||
OriginVisit, | |||||
Person, | Person, | ||||
RawExtrinsicMetadata, | RawExtrinsicMetadata, | ||||
Revision, | Revision, | ||||
RevisionType, | RevisionType, | ||||
SkippedContent, | SkippedContent, | ||||
Timestamp, | Timestamp, | ||||
TimestampWithTimezone, | TimestampWithTimezone, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 334 Lines • ▼ Show 20 Lines | |||||
type_visit1 = "git" | type_visit1 = "git" | ||||
date_visit2 = datetime.datetime(2017, 1, 1, 23, 0, 0, tzinfo=datetime.timezone.utc) | date_visit2 = datetime.datetime(2017, 1, 1, 23, 0, 0, tzinfo=datetime.timezone.utc) | ||||
type_visit2 = "hg" | type_visit2 = "hg" | ||||
date_visit3 = datetime.datetime(2018, 1, 1, 23, 0, 0, tzinfo=datetime.timezone.utc) | date_visit3 = datetime.datetime(2018, 1, 1, 23, 0, 0, tzinfo=datetime.timezone.utc) | ||||
type_visit3 = "deb" | type_visit3 = "deb" | ||||
origin_visit = { | origin_visit = OriginVisit( | ||||
"origin": origin.url, | origin=origin.url, visit=1, date=date_visit1, type=type_visit1, | ||||
"visit": 1, | ) | ||||
"date": date_visit1, | |||||
"type": type_visit1, | |||||
} | |||||
origin_visit2 = { | origin_visit2 = OriginVisit( | ||||
"origin": origin.url, | origin=origin.url, visit=2, date=date_visit2, type=type_visit1, | ||||
"visit": 2, | ) | ||||
"date": date_visit2, | |||||
"type": type_visit1, | |||||
} | |||||
origin_visit3 = { | origin_visit3 = OriginVisit( | ||||
"origin": origin2.url, | origin=origin2.url, visit=1, date=date_visit1, type=type_visit2, | ||||
"visit": 1, | ) | ||||
"date": date_visit1, | |||||
"type": type_visit2, | |||||
} | |||||
origin_visits = [origin_visit, origin_visit2, origin_visit3] | origin_visits = [origin_visit, origin_visit2, origin_visit3] | ||||
release = { | release = { | ||||
"id": hash_to_bytes("a673e617fcc6234e29b2cad06b8245f96c415c61"), | "id": hash_to_bytes("a673e617fcc6234e29b2cad06b8245f96c415c61"), | ||||
"name": b"v0.0.1", | "name": b"v0.0.1", | ||||
"author": { | "author": { | ||||
"name": b"olasd", | "name": b"olasd", | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |