当前位置: 首页>>代码示例>>Python>>正文


Python Bf3TestCase.setUp方法代码示例

本文整理汇总了Python中tests.Bf3TestCase.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python Bf3TestCase.setUp方法的具体用法?Python Bf3TestCase.setUp怎么用?Python Bf3TestCase.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tests.Bf3TestCase的用法示例。


在下文中一共展示了Bf3TestCase.setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
 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()
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:10,代码来源:test_scrambler.py

示例2: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
 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()
开发者ID:thomasleveil,项目名称:b3-plugin-poweradminbf3,代码行数:10,代码来源:test_scrambler.py

示例3: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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()
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:11,代码来源:test_cmd_vehicles.py

示例4: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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()
开发者ID:manishas,项目名称:b3-plugin-votemapbf3,代码行数:12,代码来源:test_functional.py

示例5: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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()
开发者ID:ragsden,项目名称:b3-plugin-bf3stats,代码行数:12,代码来源:test_command_bf3stats_no_update.py

示例6: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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')
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:12,代码来源:test_cmd_roundrestart.py

示例7: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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")
开发者ID:thomasleveil,项目名称:b3-plugin-poweradminbf3,代码行数:13,代码来源:test_cmd_vipsave.py

示例8: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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')
开发者ID:ozon,项目名称:b3-plugin-randomgmwp,代码行数:13,代码来源:test_randomgmwp.py

示例9: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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()
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:14,代码来源:test_cmd_scramblemode.py

示例10: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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()
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:14,代码来源:test_cmd_yell.py

示例11: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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
开发者ID:thomasleveil,项目名称:b3-plugin-poweradminbf3,代码行数:19,代码来源:test_cmd_viplist.py

示例12: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
    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
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:23,代码来源:test_cmd_nuke.py

示例13: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
 def setUp(self):
     Bf3TestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = VotemapPlugin(self.console, self.conf)
     self.p.onLoadConfig()
     self.p.onStartup()
开发者ID:thomasleveil,项目名称:b3-plugin-votemapbf3,代码行数:8,代码来源:test_plugin.py

示例14: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
 def setUp(self):
     Bf3TestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = VotemapPlugin(self.console, self.conf)
     logger = logging.getLogger('output')
     logger.setLevel(logging.INFO)
开发者ID:manishas,项目名称:b3-plugin-votemapbf3,代码行数:8,代码来源:test_messages.py

示例15: setUp

# 需要导入模块: from tests import Bf3TestCase [as 别名]
# 或者: from tests.Bf3TestCase import setUp [as 别名]
 def setUp(self):
     Bf3TestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.setExistingPaths([])
开发者ID:markweirath,项目名称:b3-plugin-poweradminbf3,代码行数:6,代码来源:test_server_config_path.py


注:本文中的tests.Bf3TestCase.setUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。