Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/test_origin_head.py
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | def test_git_partial_snapshot(self): | ||||
{"url": origin_url,} | {"url": origin_url,} | ||||
) | ) | ||||
visit = self.indexer.storage.origin_visit_add( | visit = self.indexer.storage.origin_visit_add( | ||||
[ | [ | ||||
OriginVisit( | OriginVisit( | ||||
origin=origin_url, | origin=origin_url, | ||||
date=datetime(2019, 2, 27, tzinfo=timezone.utc), | date=datetime(2019, 2, 27, tzinfo=timezone.utc), | ||||
type="git", | type="git", | ||||
status="ongoing", | |||||
snapshot=None, | |||||
) | ) | ||||
] | ] | ||||
)[0] | )[0] | ||||
self.indexer.storage.snapshot_add( | self.indexer.storage.snapshot_add( | ||||
[ | [ | ||||
{ | { | ||||
"id": b"foo", | "id": b"foo", | ||||
"branches": { | "branches": { | ||||
Show All 27 Lines | def test_pypi_missing_branch(self): | ||||
{"url": origin_url,} | {"url": origin_url,} | ||||
) | ) | ||||
visit = self.indexer.storage.origin_visit_add( | visit = self.indexer.storage.origin_visit_add( | ||||
[ | [ | ||||
OriginVisit( | OriginVisit( | ||||
origin=origin_url, | origin=origin_url, | ||||
date=datetime(2019, 2, 27, tzinfo=timezone.utc), | date=datetime(2019, 2, 27, tzinfo=timezone.utc), | ||||
type="pypi", | type="pypi", | ||||
status="ongoing", | |||||
snapshot=None, | |||||
) | ) | ||||
] | ] | ||||
)[0] | )[0] | ||||
self.indexer.storage.snapshot_add( | self.indexer.storage.snapshot_add( | ||||
[ | [ | ||||
{ | { | ||||
"id": b"foo", | "id": b"foo", | ||||
"branches": { | "branches": { | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |