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)
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()
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()
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)
def tearDown(self): B3TestCase.tearDown(self) mockito.unstub()
def tearDown(self): self.console._plugins.clear() B3TestCase.tearDown(self)
def tearDown(self): B3TestCase.tearDown(self) timer_patcher.stop() unstub()
def tearDown(self): B3TestCase.tearDown(self) self.timer_patcher.stop()
def tearDown(self): B3TestCase.tearDown(self)
def tearDown(self): """this method is called after each test""" B3TestCase.tearDown(self) self.storage.shutdown()
def tearDown(self): B3TestCase.tearDown(self) unstub()
def tearDown(self): """this method is called after each test""" B3TestCase.tearDown(self) self.storage.query("DROP DATABASE b3_test") self.storage.shutdown()
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()
def tearDown(self): B3TestCase.tearDown(self) self.queueEvent_patcher.stop()