def setUp(self): TestBase.setUp(self) self._mlist.addNewMember('*****@*****.**', digest=0, password='******', language='xx', realname='A. Nice Person')
def setUp(self): TestBase.setUp(self) if mm_cfg.SMTPPORT == 0: mm_cfg.SMTPPORT = 25 # Second argument tuple is ignored. self._server = SinkServer(('localhost', mm_cfg.SMTPPORT), ('localhost', 25))
def setUp(self): """ instantiieren; sources laden; db init. """ TestBase.setUp(self) self.mc.scan_source_dirs_all() self.mc.scan_sources() self.mc.source_load_first()
def setUp(self): ''' 1 -> a ab abc 2 -> b ab bca ''' TestBase.setUp(self) obj = self.obj1; index = self.sti obj.sti = 'a ab abc'; index.index_object(1, obj) obj.sti = 'b ab bca'; index.index_object(2, obj)
def tearDown(self): try: os.unlink(mm_cfg.SITE_PW_FILE) except OSError as e: if e.errno != errno.ENOENT: raise try: os.unlink(mm_cfg.LISTCREATOR_PW_FILE) except OSError as e: if e.errno != errno.ENOENT: raise TestBase.tearDown(self)
def tearDown(self): try: os.unlink(mm_cfg.SITE_PW_FILE) except OSError as e: if e.errno != errno.ENOENT: raise try: os.unlink(mm_cfg.LISTCREATOR_PW_FILE) except OSError as e: if e.errno != errno.ENOENT: raise del os.environ['HTTP_COOKIE'] TestBase.tearDown(self)
def setUp(self): TestBase.setUp(self) self.mc.src_cur = self.mc.src_main_dir+testfile self.mc.keep_in_memory = True self.mc.work() first = self.mc.data_array.items()[0] #print str(first) self.mc.data_in = first[1] ### ab hier work_ds prozedur = self.mc.work_ds(first) self.mc.initDataStore() self.mc.set_operation( first[1] )
def setUp(self): ''' 1 -> a 2 -> b 3 -> ba 4 -> bab 5 -> c 6 -> cb 7 -> d\e ''' TestBase.setUp(self) self.index = index = self.fi; obj = self.obj1 index.TermType = self.TermType for i, val in enumerate(r'a b ba bab c cb d\e'.split()): obj.id = val index.index_object(i+1, obj)
def setUp(self): TestBase.setUp(self) Utils.set_global_password('bbBBbb', siteadmin=1) Utils.set_global_password('ccCCcc', siteadmin=0) mlist = self._mlist mlist.mod_password = password('abcdefg') mlist.addNewMember('*****@*****.**', password='******') # Set up the cookie data sfp = StripperIO() print(mlist.MakeCookie(mm_cfg.AuthSiteAdmin), file=sfp) # AuthCreator isn't handled in AuthContextInfo() print(mlist.MakeCookie(mm_cfg.AuthListAdmin), file=sfp) print(mlist.MakeCookie(mm_cfg.AuthListModerator), file=sfp) print(mlist.MakeCookie(mm_cfg.AuthUser, '*****@*****.**'), file=sfp) # Strip off the "Set-Cookie: " prefix cookie = sfp.getvalue() os.environ['HTTP_COOKIE'] = cookie
def setUp(self): TestBase.setUp(self) Utils.set_global_password('bbBBbb', siteadmin=1) Utils.set_global_password('ccCCcc', siteadmin=0) mlist = self._mlist mlist.mod_password = password('abcdefg') mlist.addNewMember('*****@*****.**', password='******') # Set up the cookie data sfp = StripperIO() print >> sfp, mlist.MakeCookie(mm_cfg.AuthSiteAdmin) # AuthCreator isn't handled in AuthContextInfo() print >> sfp, mlist.MakeCookie(mm_cfg.AuthListAdmin) print >> sfp, mlist.MakeCookie(mm_cfg.AuthListModerator) print >> sfp, mlist.MakeCookie(mm_cfg.AuthUser, '*****@*****.**') # Strip off the "Set-Cookie: " prefix cookie = sfp.getvalue() os.environ['HTTP_COOKIE'] = cookie
def tearDown(self): self._server.close() TestBase.tearDown(self)
def __init__(self): TestBase.__init__(self, name="VBO Test")
def tearDown(self): """ datenbank-verbindung schliessen """ TestBase.tearDown(self)
def setUp(self): """ MC initialisiert store """ #TestWorker.setUp(self) TestBase.setUp(self)
class TestAuthenticate(TestBase): def setUp(self): TestBase.setUp(self) Utils.set_global_password('bbBBbb', siteadmin=1) Utils.set_global_password('ccCCcc', siteadmin=0) def tearDown(self): try: os.unlink(mm_cfg.SITE_PW_FILE) except OSError, e: if e.errno <> errno.ENOENT: raise try: os.unlink(mm_cfg.LISTCREATOR_PW_FILE) except OSError, e: if e.errno <> errno.ENOENT: raise TestBase.tearDown(self) def test_auth_creator(self): self.assertEqual(self._mlist.Authenticate( [mm_cfg.AuthCreator], 'ccCCcc'), mm_cfg.AuthCreator) def test_auth_creator_unauth(self): self.assertEqual(self._mlist.Authenticate( [mm_cfg.AuthCreator], 'xxxxxx'), mm_cfg.UnAuthorized) def test_auth_site_admin(self): self.assertEqual(self._mlist.Authenticate( [mm_cfg.AuthSiteAdmin], 'bbBBbb'), mm_cfg.AuthSiteAdmin) def test_auth_site_admin_unauth(self): self.assertEqual(self._mlist.Authenticate(
def tearDown(self): """ datenbank-verbindung schliessen """ self.mc.store.conn_close() TestBase.tearDown(self)
def setUp(self): TestBase.setUp(self) self.rules = MoveRules()
def setUp(self): TestBase.setUp(self) Utils.set_global_password('bbBBbb', siteadmin=1) Utils.set_global_password('ccCCcc', siteadmin=0)
def setUpClass(cls): cls.testBase = TestBase()