當前位置: 首頁>>代碼示例>>Python>>正文


Python tests.Bf3TestCase類代碼示例

本文整理匯總了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()
開發者ID:thomasleveil,項目名稱:b3-plugin-poweradminbf3,代碼行數:8,代碼來源:test_scrambler.py

示例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()
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:8,代碼來源:test_scrambler.py

示例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()
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:9,代碼來源:test_cmd_vehicles.py

示例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()
開發者ID:ragsden,項目名稱:b3-plugin-bf3stats,代碼行數:10,代碼來源:test_command_bf3stats_no_update.py

示例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()
開發者ID:manishas,項目名稱:b3-plugin-votemapbf3,代碼行數:10,代碼來源:test_functional.py

示例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')
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:10,代碼來源:test_cmd_roundrestart.py

示例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")
開發者ID:thomasleveil,項目名稱:b3-plugin-poweradminbf3,代碼行數:11,代碼來源:test_cmd_vipsave.py

示例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')
開發者ID:ozon,項目名稱:b3-plugin-randomgmwp,代碼行數:11,代碼來源:test_randomgmwp.py

示例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()
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:12,代碼來源:test_cmd_scramblemode.py

示例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()
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:12,代碼來源:test_cmd_yell.py

示例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
開發者ID:thomasleveil,項目名稱:b3-plugin-poweradminbf3,代碼行數:17,代碼來源:test_cmd_viplist.py

示例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
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:21,代碼來源:test_cmd_nuke.py

示例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)
開發者ID:manishas,項目名稱:b3-plugin-votemapbf3,代碼行數:6,代碼來源:test_messages.py

示例14: setUp

 def setUp(self):
     Bf3TestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.setExistingPaths([])
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:4,代碼來源:test_server_config_path.py

示例15: setUpClass

 def setUpClass(cls):
     Bf3TestCase.setUpClass()
     cls.sleep_patcher = patch.object(time, "sleep")
     cls.sleep_patcher.start()
開發者ID:markweirath,項目名稱:b3-plugin-poweradminbf3,代碼行數:4,代碼來源:test_cmd_roundrestart.py


注:本文中的tests.Bf3TestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。