Changeset View
Changeset View
Standalone View
Standalone View
swh/fuse/tests/test_revision.py
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | for swhid in expected: | ||||
meta = get_data_from_web_archive(str(swhid)) | meta = get_data_from_web_archive(str(swhid)) | ||||
date = dateutil.parser.parse(meta["date"]) | date = dateutil.parser.parse(meta["date"]) | ||||
depth1 = RevisionHistoryShardByDate.DATE_FMT.format( | depth1 = RevisionHistoryShardByDate.DATE_FMT.format( | ||||
year=date.year, month=date.month, day=date.day | year=date.year, month=date.month, day=date.day | ||||
) | ) | ||||
depth2 = str(swhid) | depth2 = str(swhid) | ||||
assert (dir_by_date / depth1).exists() | assert (dir_by_date / depth1).exists() | ||||
assert depth2 in (os.listdir(dir_by_date / depth1)) | assert depth2 in (os.listdir(dir_by_date / depth1)) | ||||
assert not (dir_by_date / ".status").exists() |