def test_dict_max(self): inputs = [ {"test":"skickass"}, {"we": "dont", "care":{"about":0,"sub": "types"}}, ] val_func = vals.Dict(max_=3) for input in inputs: val_func(input)
def __init__(self, name, min_=None, max_=None, optional=False): super(Dict, self).__init__( name, optional, default=None, validator=validate.Dict(min_, max_) )