本文整理汇总了Python中tests.Bf3TestCase类的典型用法代码示例。如果您正苦于以下问题:Python Bf3TestCase类的具体用法?Python Bf3TestCase怎么用?Python Bf3TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Bf3TestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
with logging_disabled():
self.p = Poweradminbf3Plugin(self.console, self.conf)
when(self.console).write(('vars.roundStartPlayerCount',)).thenReturn(['0'])
self.scrambleTeams_mock = self.p._scrambler.scrambleTeams = Mock(name="scrambleTeams", wraps=self.p._scrambler.scrambleTeams)
self.scrambleTeams_mock.reset_mock()
示例2: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.p = Poweradminbf3Plugin(self.console, self.conf)
logger = logging.getLogger('output')
logger.setLevel(logging.INFO)
self.scrambleTeams_mock = self.p._scrambler.scrambleTeams = Mock(name="scrambleTeams", wraps=self.p._scrambler.scrambleTeams)
self.scrambleTeams_mock.reset_mock()
示例3: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
vehicles: 20
""")
self.p = Poweradminbf3Plugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
示例4: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""
[commands]
bf3stats: 0
""")
self.p = Bf3StatsPlugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
示例5: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""\
[commands]
cancelvote-cv: 20
""")
self.p = VotemapPlugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
示例6: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
roundrestart: 20
""")
self.p = Poweradminbf3Plugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
self.superadmin.connects('superadmin')
示例7: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
vipsave: 20
""")
self.p = Poweradminbf3Plugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
self.moderator.connects("moderator")
示例8: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
gmwp: 20
""")
self.p = RgmwpPlugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.console.game.gameName = 'bf3'
self.p.onStartup()
self.superadmin.connects('superadmin')
示例9: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
scramblemode: 20
""")
self.p = Poweradminbf3Plugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
self.p._scrambler = Mock()
self.superadmin.connects('superadmin')
self.superadmin.clearMessageHistory()
示例10: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
yellteam: 20
[preferences]
yell_duration: 2
""")
self.p = Poweradminbf3Plugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
示例11: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
viplist: 20
""")
self.p = Poweradminbf3Plugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
self.console.say = Mock()
self.console.saybig = Mock()
self.moderator.connects("moderator")
self.joe.connects('joe')
self.joe.teamId = 2
示例12: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.conf.loadFromString("""[commands]
nuke: 20
""")
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
示例13: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.p = VotemapPlugin(self.console, self.conf)
logger = logging.getLogger('output')
logger.setLevel(logging.INFO)
示例14: setUp
def setUp(self):
Bf3TestCase.setUp(self)
self.conf = CfgConfigParser()
self.setExistingPaths([])
示例15: setUpClass
def setUpClass(cls):
Bf3TestCase.setUpClass()
cls.sleep_patcher = patch.object(time, "sleep")
cls.sleep_patcher.start()