def test_ordered_dict_order():
 schema = vol.Schema(cv.ordered_dict(int, cv.string))
 val = OrderedDict()
 val['first'] = 1
 val['second'] = 2
 validated = schema(val)
 assert isinstance(validated, OrderedDict)
 assert (['first', 'second'] == list(validated.keys()))

def test_ordered_dict_order ( ) : schema = vol . Schema ( cv . ordered_dict ( int , cv . string ) ) val = OrderedDict ( ) val [ 'first' ] = 1 val [ 'second' ] = 2 validated = schema ( val ) assert isinstance ( validated , OrderedDict ) assert ( [ 'first' , 'second' ] == list ( validated . keys ( ) ) )
test ordered_dict validator .