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
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)