本文整理汇总了Python中b3.fake.FakeClient.groupBits方法的典型用法代码示例。如果您正苦于以下问题:Python FakeClient.groupBits方法的具体用法?Python FakeClient.groupBits怎么用?Python FakeClient.groupBits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类b3.fake.FakeClient
的用法示例。
在下文中一共展示了FakeClient.groupBits方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cmdrevoke_with_previously_given_grant_and_high_group_level
# 需要导入模块: from b3.fake import FakeClient [as 别名]
# 或者: from b3.fake.FakeClient import groupBits [as 别名]
def test_cmdrevoke_with_previously_given_grant_and_high_group_level(self):
# GIVEN
superadmin = FakeClient(self.console, name="superadmin", guid="superadminguid", groupBits=128)
superadmin.connects("1")
mike = FakeClient(self.console, name="mike", guid="mikeguid", groupBits=1)
mike.connects("2")
# WHEN
superadmin.says("!cmdgrant mike cmdlevel")
mike.groupBits = 64 # this 2 lines simulate mike being added as senioradmin
mike._maxLevel = 80 # after he obtained a grant for command !cmdlevel he couldn't access before
superadmin.clearMessageHistory()
superadmin.says("!cmdrevoke mike cmdlevel")
# THEN
self.assertListEqual(['mike\'s grant for cmdlevel command has been removed',
'but his group level is high enough to access the command'], superadmin.message_history)