Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/pytest_plugin.py
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | for object_type, known_values in TEST_OBJECT_DICTS.items(): | ||||
f"expected {object_type} key {pprint_key(key)} " | f"expected {object_type} key {pprint_key(key)} " | ||||
"absent from consumed messages" | "absent from consumed messages" | ||||
) | ) | ||||
if exclude and object_type in exclude: | if exclude and object_type in exclude: | ||||
continue | continue | ||||
for value in known_values: | for value in known_values: | ||||
if object_type == "origin_visit": | |||||
value["date"] = str(value["date"]) | |||||
assert value in received_values, ( | assert value in received_values, ( | ||||
f"expected {object_type} value {value!r} is " | f"expected {object_type} value {value!r} is " | ||||
"absent from consumed messages" | "absent from consumed messages" | ||||
) | ) | ||||
@pytest.fixture(scope="function") | @pytest.fixture(scope="function") | ||||
def kafka_prefix(): | def kafka_prefix(): | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |