def test_single_key_output(): data = { 'key1': ('v1',), 'key2': ('v2',), 'key3': ('v3',) } expected = {k: next(iter(v)) for k, v in data.items()} assert dict(tools.single_key_output(data.items())) == expected
def output(self, items): return tools.single_key_output(items)