def setUp(self): Bf3TestCase.setUp(self) self.conf = XmlConfigParser() self.conf.loadFromString(""" <configuration plugin="poweradminbf3"> <settings name="commands"> <set name="nuke">20</set> </settings> </configuration> """) self.p = Poweradminbf3Plugin(self.console, self.conf) self.p.onLoadConfig() self.p.onStartup() self.sleep_patcher = patch.object(time, 'sleep') self.sleep_patcher.start() self.console.say = Mock() self.console.saybig = Mock() self.moderator.connects("moderator") self.moderator.teamId = 1 self.joe.connects('joe') self.joe.teamId = 2
def setUp(self): Bf3TestCase.setUp(self) self.conf = XmlConfigParser() self.conf.loadFromString(""" <configuration plugin="poweradminbf3"> <settings name="commands"> <set name="vehicles">20</set> </settings> </configuration> """) self.p = Poweradminbf3Plugin(self.console, self.conf) self.p.onLoadConfig() self.p.onStartup()
def tearDown(self): Bf3TestCase.tearDown(self) self.sleep_patcher.stop()
def setUp(self): Bf3TestCase.setUp(self) self.conf = XmlConfigParser() self.setExistingPaths([])
def setUpClass(cls): Bf3TestCase.setUpClass() cls.sleep_patcher = patch.object(time, "sleep") cls.sleep_patcher.start()