def __init__(self, *args, **kwargs): Admin_TestCase.__init__(self, *args, **kwargs) if not self.__class__.MESSAGE_BEACON: raise NotImplementedError( "you are supposed to set MESSAGE_BEACON with a string to look for in warning " "and error messages when inheriting from Config_reading_TestCase" )
def setUp(self): Admin_TestCase.setUp(self) self.warning_patcher = patch.object(self.p, "warning", wraps=self.p.warning) self.warning_mock = self.warning_patcher.start() self.error_patcher = patch.object(self.p, "error", wraps=self.p.error) self.error_mock = self.error_patcher.start()
def setUp(self): Admin_TestCase.setUp(self) self.init()
def tearDown(self): Admin_TestCase.tearDown(self) self.warning_patcher.stop() self.error_patcher.stop()
def __init__(self, *args, **kwargs): Admin_TestCase.__init__(self, *args, **kwargs) if not self.__class__.MESSAGE_BEACON: raise NotImplementedError("you are supposed to set MESSAGE_BEACON with a string to look for in warning " "and error messages when inheriting from Config_reading_TestCase")