

def test_to_keyvalue_pairs_if_parameter_is_a_dict_then_pairs_are_build(self):
    result = to_keyvalue_pairs({
        'a': 1,
        'b': 2,
        'c': 3,
    }, ['key'])
    self.assertEquals(result.sort(), [('key_a', 1), ('key_b', 2), ('key_c', 3)].sort())

dataset/ETHPy150Open vladikk/JSON2CSV/json2csv-tests.py JSON2CSVTests.test_to_keyvalue_pairs_if_parameter_is_a_dict_then_pairs_are_build/original