Beispiel #1
0
 def setUp(self):
     CustomcommandsTestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = CustomcommandsPlugin(self.console, self.conf)
     self.p.onLoadConfig()
     self.p.onStartup()
     self.player1 = FakeClient(console=self.console, name="Player1", guid="player1GUID", pbid="player1PBID")
     self.player2 = FakeClient(console=self.console, name="Player2", guid="player2GUID", pbid="player2PBID")
     self.player1.connects(cid="slot1")
     self.player2.connects(cid="slot2")
 def setUp(self):
     CustomcommandsTestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = CustomcommandsPlugin(self.console, self.conf)
     self.player1 = FakeClient(console=self.console, name="Player1", guid="player1GUID", pbid="player1PBID")
     self.player2 = FakeClient(console=self.console, name="Player2", guid="player2GUID", pbid="player2PBID")
     self.player1.connects(cid="slot1")
     self.player2.connects(cid="slot2")
     self.write_patcher = patch.object(self.console, "write", wrap=self.console.write)
     self.write_mock = self.write_patcher.start()
Beispiel #3
0
 def setUp(self):
     with logging_disabled():
         CustomcommandsTestCase.setUp(self)
         self.conf = CfgConfigParser()
         self.p = CustomcommandsPlugin(self.console, self.conf)
         self.guest = FakeClient(console=self.console, name="Guest", guid="GuestGUID", pbid="GuestPBID", group_bits=0)
         self.player1 = FakeClient(console=self.console, name="player1", guid="player1GUID", pbid="player1PBID", group_bits=1)
         self.player1.connects(cid="CID1")
         self.player2 = FakeClient(console=self.console, name="player2", guid="player2GUID", pbid="player2PBID", group_bits=1)
         self.player2.connects(cid="CID2")
         self.guest.connects(cid="guestCID")
 def setUp(self):
     CustomcommandsTestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = CustomcommandsPlugin(self.console, self.conf)
     with logging_disabled():
         from b3.fake import FakeClient
     self.guest = FakeClient(console=self.console, name="Guest", guid="GuestGUID", pbid="GuestPBID", group_bits=0)
     self.user = FakeClient(console=self.console, name="User", guid="UserGUID", pbid="UserPBID", group_bits=1)
     self.regular = FakeClient(console=self.console, name="Regular", guid="RegularGUID", pbid="RegularPBID", group_bits=2)
     self.mod = FakeClient(console=self.console, name="Moderator", guid="ModeratorGUID", pbid="ModeratorPBID", group_bits=8)
     self.admin = FakeClient(console=self.console, name="Admin", guid="AdminGUID", pbid="AdminPBID", group_bits=16)
     self.fulladmin = FakeClient(console=self.console, name="FullAdmin", guid="FullAdminGUID", pbid="FullAdminPBID", group_bits=32)
     self.senioradmin = FakeClient(console=self.console, name="SeniorAdmin", guid="SeniorAdminGUID", pbid="SeniorAdminPBID", group_bits=64)
     self.superadmin = FakeClient(console=self.console, name="SuperAdmin", guid="SuperAdminGUID", pbid="SuperAdminPBID", group_bits=128)
 def setUp(self):
     CustomcommandsTestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = CustomcommandsPlugin(self.console, self.conf)
     with logging_disabled():
         from b3.fake import FakeClient
     self.guest = FakeClient(console=self.console,
                             name="Guest",
                             guid="GuestGUID",
                             pbid="GuestPBID",
                             group_bits=0)
     self.user = FakeClient(console=self.console,
                            name="User",
                            guid="UserGUID",
                            pbid="UserPBID",
                            group_bits=1)
     self.regular = FakeClient(console=self.console,
                               name="Regular",
                               guid="RegularGUID",
                               pbid="RegularPBID",
                               group_bits=2)
     self.mod = FakeClient(console=self.console,
                           name="Moderator",
                           guid="ModeratorGUID",
                           pbid="ModeratorPBID",
                           group_bits=8)
     self.admin = FakeClient(console=self.console,
                             name="Admin",
                             guid="AdminGUID",
                             pbid="AdminPBID",
                             group_bits=16)
     self.fulladmin = FakeClient(console=self.console,
                                 name="FullAdmin",
                                 guid="FullAdminGUID",
                                 pbid="FullAdminPBID",
                                 group_bits=32)
     self.senioradmin = FakeClient(console=self.console,
                                   name="SeniorAdmin",
                                   guid="SeniorAdminGUID",
                                   pbid="SeniorAdminPBID",
                                   group_bits=64)
     self.superadmin = FakeClient(console=self.console,
                                  name="SuperAdmin",
                                  guid="SuperAdminGUID",
                                  pbid="SuperAdminPBID",
                                  group_bits=128)
Beispiel #6
0
 def setUp(self):
     CustomcommandsTestCase.setUp(self)
     self.conf = CfgConfigParser()
     self.p = CustomcommandsPlugin(self.console, self.conf)
     self.player1 = FakeClient(console=self.console,
                               name="Player1",
                               guid="player1GUID",
                               pbid="player1PBID")
     self.player2 = FakeClient(console=self.console,
                               name="Player2",
                               guid="player2GUID",
                               pbid="player2PBID")
     self.player1.connects(cid="slot1")
     self.player2.connects(cid="slot2")
     self.write_patcher = patch.object(self.console,
                                       "write",
                                       wrap=self.console.write)
     self.write_mock = self.write_patcher.start()
Beispiel #7
0
 def tearDown(self):
     CustomcommandsTestCase.tearDown(self)
     self.write_mock = self.write_patcher.stop()
 def tearDown(self):
     CustomcommandsTestCase.tearDown(self)
     self.write_mock = self.write_patcher.stop()