本文整理汇总了Python中b3.fake.FakeClient.message方法的典型用法代码示例。如果您正苦于以下问题:Python FakeClient.message方法的具体用法?Python FakeClient.message怎么用?Python FakeClient.message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类b3.fake.FakeClient
的用法示例。
在下文中一共展示了FakeClient.message方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_tempban_non_existing_player
# 需要导入模块: from b3.fake import FakeClient [as 别名]
# 或者: from b3.fake.FakeClient import message [as 别名]
def test_tempban_non_existing_player(self):
joe = FakeClient(Admin_functional_test.fakeConsole, name="Joe", exactName="Joe", guid="joeguid", groupBits=128, team=b3.TEAM_RED)
mike = FakeClient(Admin_functional_test.fakeConsole, name="Mike", exactName="Mike", guid="mikeguid", groupBits=1, team=b3.TEAM_BLUE)
joe.message = Mock()
joe.connects(0)
mike.connects(1)
joe.says('!tempban foo 5h')
joe.message.assert_called_with('^7No players found matching foo')
示例2: test_tempban_no_duration
# 需要导入模块: from b3.fake import FakeClient [as 别名]
# 或者: from b3.fake.FakeClient import message [as 别名]
def test_tempban_no_duration(self):
joe = FakeClient(Admin_functional_test.fakeConsole, name="Joe", exactName="Joe", guid="joeguid", groupBits=128, team=b3.TEAM_RED)
mike = FakeClient(Admin_functional_test.fakeConsole, name="Mike", exactName="Mike", guid="mikeguid", groupBits=1, team=b3.TEAM_BLUE)
joe.message = Mock()
joe.connects(0)
mike.connects(1)
joe.says('!tempban mike')
joe.message.assert_called_with('^7Invalid parameters')
示例3: test_tempban_no_reason
# 需要导入模块: from b3.fake import FakeClient [as 别名]
# 或者: from b3.fake.FakeClient import message [as 别名]
def test_tempban_no_reason(self):
joe = FakeClient(Admin_functional_test.fakeConsole, name="Joe", exactName="Joe", guid="joeguid", groupBits=128, team=b3.TEAM_RED)
mike = FakeClient(Admin_functional_test.fakeConsole, name="Mike", exactName="Mike", guid="mikeguid", groupBits=1, team=b3.TEAM_BLUE)
joe.message = Mock()
joe.connects(0)
mike.connects(1)
mike.tempban = Mock()
joe.says('!tempban mike 5h')
mike.tempban.assert_called_with('', None, 5*60, joe)