def setUp(self): self.form = FieldStorage() self.client = MockNull() self.client._ok_message = [] self.client._error_message = [] self.client.add_error_message = lambda x : add_message( self.client._error_message, x) self.client.add_ok_message = lambda x : add_message( self.client._ok_message, x) self.client.form = self.form class TemplatingUtils: pass self.client.instance.interfaces.TemplatingUtils = TemplatingUtils
def setUp(self): self.form = FieldStorage(environ={'QUERY_STRING': ''}) self.client = MockNull() self.client._ok_message = [] self.client._error_message = [] self.client.add_error_message = lambda x : add_message( self.client._error_message, x) self.client.add_ok_message = lambda x : add_message( self.client._ok_message, x) self.client.form = self.form self.client.base = "http://whoami.com/path/" class TemplatingUtils: pass self.client.instance.interfaces.TemplatingUtils = TemplatingUtils
def setUp(self): self.form = FieldStorage(environ={'QUERY_STRING': ''}) self.client = MockNull() self.client._ok_message = [] self.client._error_message = [] self.client.add_error_message = lambda x: add_message( self.client._error_message, x) self.client.add_ok_message = lambda x: add_message( self.client._ok_message, x) self.client.form = self.form class TemplatingUtils: pass self.client.instance.interfaces.TemplatingUtils = TemplatingUtils
def setUp(self): self.form = FieldStorage(environ={'QUERY_STRING': ''}) self.client = MockNull() self.client.db.Otk = MockNull() self.client.db.Otk.data = {} self.client.db.Otk.getall = self.data_get self.client.db.Otk.set = self.data_set self.client.db.config.WEB_LOGIN_ATTEMPTS_MIN = 20 self.client._ok_message = [] self.client._error_message = [] self.client.add_error_message = lambda x, escape=True: add_message( self.client._error_message, x, escape=escape) self.client.add_ok_message = lambda x: add_message( self.client._ok_message, x) self.client.form = self.form self.client.base = "http://whoami.com/path/" class TemplatingUtils: pass self.client.instance.interfaces.TemplatingUtils = TemplatingUtils