Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/test_converters.py
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | def test_db_to_author(): | ||||
# then | # then | ||||
assert actual_author == { | assert actual_author == { | ||||
"fullname": b"fullname", | "fullname": b"fullname", | ||||
"name": b"name", | "name": b"name", | ||||
"email": b"email", | "email": b"email", | ||||
} | } | ||||
def test_db_to_author_none(): | |||||
# when | |||||
actual_author = converters.db_to_author(None, None, None) | |||||
# then | |||||
assert actual_author is None | |||||
def test_db_to_revision(): | def test_db_to_revision(): | ||||
# when | # when | ||||
actual_revision = converters.db_to_revision( | actual_revision = converters.db_to_revision( | ||||
{ | { | ||||
"id": "revision-id", | "id": "revision-id", | ||||
"date": None, | "date": None, | ||||
"date_offset": None, | "date_offset": None, | ||||
"date_neg_utc_offset": None, | "date_neg_utc_offset": None, | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |