Exemplo n.º 1
0
 def setUp(self):
     TestBase.setUp(self)
     self._mlist.addNewMember('*****@*****.**',
                              digest=0,
                              password='******',
                              language='xx',
                              realname='A. Nice Person')
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 def setUp(self):
     TestBase.setUp(self)
     self._mlist.addNewMember('*****@*****.**',
                              digest=0,
                              password='******',
                              language='xx',
                              realname='A. Nice Person')
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
    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()
Exemplo n.º 6
0
 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)
Exemplo n.º 9
0
    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] )
Exemplo n.º 10
0
 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
Exemplo n.º 12
0
 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
Exemplo n.º 13
0
 def tearDown(self):
     self._server.close()
     TestBase.tearDown(self)
Exemplo n.º 14
0
 def tearDown(self):
     self._server.close()
     TestBase.tearDown(self)
Exemplo n.º 15
0
 def __init__(self):
     TestBase.__init__(self, name="VBO Test")
Exemplo n.º 16
0
 def tearDown(self):
     """ datenbank-verbindung schliessen """
     TestBase.tearDown(self)
Exemplo n.º 17
0
 def setUp(self):
     """ MC initialisiert store """
     #TestWorker.setUp(self)
     TestBase.setUp(self)
Exemplo n.º 18
0
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(
Exemplo n.º 19
0
 def tearDown(self):
     """ datenbank-verbindung schliessen """
     self.mc.store.conn_close()
     TestBase.tearDown(self)
Exemplo n.º 20
0
 def setUp(self):
     TestBase.setUp(self)
     self.rules = MoveRules()
Exemplo n.º 21
0
 def setUp(self):
     TestBase.setUp(self)
     Utils.set_global_password('bbBBbb', siteadmin=1)
     Utils.set_global_password('ccCCcc', siteadmin=0)
Exemplo n.º 22
0
 def setUpClass(cls):
     cls.testBase = TestBase()
 def setUp(self):
     TestBase.setUp(self)
     Utils.set_global_password('bbBBbb', siteadmin=1)
     Utils.set_global_password('ccCCcc', siteadmin=0)