def init(self, config_content=None):
        """ optionally specify a config for the plugin. If called with no parameter, then the default config is loaded """
        if config_content is None:
            if not os.path.isfile(ADMIN_CONFIG_FILE):
                B3TestCase.tearDown(
                    self
                )  # we are skipping the test at a late stage after setUp was called
                raise unittest.SkipTest("%s is not a file" % ADMIN_CONFIG_FILE)
            else:
                self.conf.load(ADMIN_CONFIG_FILE)
        else:
            self.conf.loadFromString(config_content)
        self.p.onLoadConfig()
        self.p.onStartup()

        self.joe = FakeClient(self.console,
                              name="Joe",
                              exactName="Joe",
                              guid="joeguid",
                              groupBits=128,
                              team=TEAM_RED)
        self.mike = FakeClient(self.console,
                               name="Mike",
                               exactName="Mike",
                               guid="mikeguid",
                               groupBits=1,
                               team=TEAM_BLUE)
예제 #2
0
 def init(self, config_content=None):
     """ optionally specify a config for the plugin. If called with no parameter, then the default config is loaded """
     if config_content is None:
         if not os.path.isfile(ADMIN_CONFIG_FILE):
             B3TestCase.tearDown(self)  # we are skipping the test at a late stage after setUp was called
             raise unittest.SkipTest("%s is not a file" % ADMIN_CONFIG_FILE)
         else:
             self.conf.load(ADMIN_CONFIG_FILE)
     else:
         self.conf.loadFromString(config_content)
     self.p.onLoadConfig()
     self.p.onStartup()
예제 #3
0
 def init(self, config_content=None):
     """ optionally specify a config for the plugin. If called with no parameter, then the default config is loaded """
     if config_content is None:
         if not os.path.isfile(ADMIN_CONFIG_FILE):
             B3TestCase.tearDown(
                 self
             )  # we are skipping the test at a late stage after setUp was called
             raise unittest.SkipTest("%s is not a file" % ADMIN_CONFIG_FILE)
         else:
             self.conf.load(ADMIN_CONFIG_FILE)
     else:
         self.conf.loadFromString(config_content)
     self.p.onLoadConfig()
     self.p.onStartup()
예제 #4
0
    def init(self, config_content=None):
        """ optionally specify a config for the plugin. If called with no parameter, then the default config is loaded """
        if config_content is None:
            if not os.path.isfile(ADMIN_CONFIG_FILE):
                B3TestCase.tearDown(self) # we are skipping the test at a late stage after setUp was called
                raise unittest.SkipTest("%s is not a file" % ADMIN_CONFIG_FILE)
            else:
                self.conf.load(ADMIN_CONFIG_FILE)
        else:
            self.conf.loadFromString(config_content)
        self.p.onLoadConfig()
        self.p.onStartup()

        self.joe = FakeClient(self.console, name="Joe", exactName="Joe", guid="joeguid", groupBits=128, team=TEAM_RED)
        self.mike = FakeClient(self.console, name="Mike", exactName="Mike", guid="mikeguid", groupBits=1, team=TEAM_BLUE)
예제 #5
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     mockito.unstub()
예제 #6
0
 def tearDown(self):
     self.console._plugins.clear()
     B3TestCase.tearDown(self)
예제 #7
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     timer_patcher.stop()
     unstub()
예제 #8
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     self.timer_patcher.stop()
예제 #9
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     timer_patcher.stop()
     unstub()
예제 #10
0
 def tearDown(self):
     B3TestCase.tearDown(self)
 def tearDown(self):
     """this method is called after each test"""
     B3TestCase.tearDown(self)
     self.storage.shutdown()
예제 #12
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     unstub()
예제 #13
0
 def tearDown(self):
     """this method is called after each test"""
     B3TestCase.tearDown(self)
     self.storage.query("DROP DATABASE b3_test")
     self.storage.shutdown()
예제 #14
0
 def tearDown(self):
     """this method is called after each test"""
     B3TestCase.tearDown(self)
     self.storage.query("DROP DATABASE `%s`" % MYSQL_TEST_DB)
     self.storage.shutdown()
예제 #15
0
 def tearDown(self):
     B3TestCase.tearDown(self)
예제 #16
0
 def tearDown(self):
     self.console._plugins.clear()
     B3TestCase.tearDown(self)
예제 #17
0
 def tearDown(self):
     """this method is called after each test"""
     B3TestCase.tearDown(self)
     self.storage.query("DROP DATABASE b3_test")
     self.storage.shutdown()
예제 #18
0
 def tearDown(self):
     """this method is called after each test"""
     B3TestCase.tearDown(self)
     self.storage.shutdown()
예제 #19
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     self.queueEvent_patcher.stop()
예제 #20
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     self.timer_patcher.stop()
예제 #21
0
 def tearDown(self):
     B3TestCase.tearDown(self)
     unstub()