def test_basic_key_value_pairs(self): data = (('a', 'b'), ('b', 'b'), ('c', 'c')) result = engine.normalize_schema(data) assert result == {0: ('a', 'b'), 1: ('b', 'b'), 2: ('c', 'c')}
def test_recurse_if_second_item_is_typle(self): data = ('a', ('a', 'b')) result = engine.normalize_schema(data) assert result == {0: ('a', {0: ('a', 'b')})}
def test_respect_more_than_two_values_in_tuple(self): data = ('a', (('a', 'b'), ('c', 'c'), ('d', 'd'))) result = engine.normalize_schema(data) assert result == {0: ('a', {0: ('a', 'b'), 1: ('c', 'c'), 2: ('d', 'd')})}
def test_return_data_structure_with_cero_index(self): result = engine.normalize_schema(['a']) assert result == {0: ['a']}