Exemple #1
0
def test_sort(
    fc: fetcher.Fetcher,
    sortkey: Tuple[str, str],
    expected_output: Sequence[Dict[str, Union[int, str, bool]]],
):
    fc.sortkey = sortkey
    result = fc._sort(DATA)
    assert result == expected_output
Exemple #2
0
def test_sort_throws_for_invalid_sort_keys(
    fc: fetcher.Fetcher, sortkey: Tuple[str, str]
):
    with pytest.raises(KeyError):
        fc.sortkey = sortkey
        fc._sort(DATA)