Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/common/test_converters.py
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | actual_output = converters.from_swh( | ||||
hashess={"d", "o", "x"}, | hashess={"d", "o", "x"}, | ||||
bytess={"c", "e", "g", "l"}, | bytess={"c", "e", "g", "l"}, | ||||
dates={"s", "s1", "s2"}, | dates={"s", "s1", "s2"}, | ||||
blacklist={"h", "m", "n", "o"}, | blacklist={"h", "m", "n", "o"}, | ||||
removables_if_empty={"t"}, | removables_if_empty={"t"}, | ||||
empty_dict={"u"}, | empty_dict={"u"}, | ||||
empty_list={"v"}, | empty_list={"v"}, | ||||
convert={"p", "q", "w"}, | convert={"p", "q", "w"}, | ||||
convert_fn=converters.convert_revision_metadata, | convert_fn=converters.convert_metadata, | ||||
) | ) | ||||
assert expected_output == actual_output | assert expected_output == actual_output | ||||
def test_from_swh_edge_cases_do_no_conversion_if_none_or_not_bytes(): | def test_from_swh_edge_cases_do_no_conversion_if_none_or_not_bytes(): | ||||
some_input = {"a": "something", "b": None, "c": "someone", "d": None, "e": None} | some_input = {"a": "something", "b": None, "c": "someone", "d": None, "e": None} | ||||
▲ Show 20 Lines • Show All 649 Lines • Show Last 20 Lines |