

def get_invalid_data_context(self, data, *args):
    "Returns context object of raised InvalidData exception.\n\n        :return: context of 'errors.InvalidData'\n        "
    serialized_data = self.serialize(data)
    with self.assertRaises(errors.InvalidData) as context:
        self.validator(serialized_data, *args)
    return context

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