

def assertRaisesInvalidAnyOf(self, obj, passed_value, instance):
    context = self.get_invalid_data_context(obj)
    self.assertIn("Failed validating 'anyOf' in schema", context.exception.message)
    err_msg = '{0} is not valid under any of the given schemas'
    self.assertIn(err_msg.format(passed_value), context.exception.message)
    self.assertIn('On instance{0}'.format(instance), context.exception.message)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py BaseValidatorTest.assertRaisesInvalidAnyOf/original