Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/tests/test_serializers.py
# Copyright (C) 2017-2020 The Software Heritage developers | # Copyright (C) 2017-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from collections import OrderedDict | from collections import OrderedDict | ||||
from datetime import datetime, timedelta, timezone | from datetime import datetime, timedelta, timezone | ||||
import itertools | import itertools | ||||
from typing import Iterable | from typing import Iterable | ||||
import pytest | import pytest | ||||
from swh.journal import serializers | from swh.journal import serializers | ||||
from swh.model.tests.swh_model_data import TEST_OBJECTS | |||||
from .conftest import TEST_OBJECTS | |||||
def test_key_to_kafka_repeatable(): | def test_key_to_kafka_repeatable(): | ||||
"""Check the kafka key encoding is repeatable""" | """Check the kafka key encoding is repeatable""" | ||||
base_dict = { | base_dict = { | ||||
"a": "foo", | "a": "foo", | ||||
"b": "bar", | "b": "bar", | ||||
"c": "baz", | "c": "baz", | ||||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |