def test_simple_policies(self): schema = SimplePolicy.get_schema() d = {'type': 'abort'} validate(d, schema) d = {'type': 'break'} validate(d, schema) d = {'type': 'continue'} validate(d, schema) d = {'type': 'ignore'} validate(d, schema)
def test_bad_policy(self): schema = SimplePolicy.get_schema() d = {'type': 'fail whale'} with self.assertRaises(ValidationError): validate(d, schema)