def setUp(self): self.data = json.loads(self.json) self.template = template(self.dict_template)
def test_invalidate_strict_enum(self): self.data['animal']['specie'] = 'Dog' self.template = template(self.dict_template, strict=True) self.assertRaises(ValidationError, self.template.validate, self.data)