def test_teamMisc(self):
     joe.says('!ts join')
     joe.team = b3.TEAM_SPEC
     joe.setvar(self.p, 'switchtarget', 'team')
     fakeConsole.queueEvent(b3.events.Event(b3.events.EVT_CLIENT_SQUAD_CHANGE, (joe.team, joe.squad), joe))
     time.sleep(.1)
     tsclient = self.p.tsGetClient(joe)
     self.assertNotEqual(tsclient, None)
     self.assertEqual(tsclient['cid'], self.p.tsChannelIdB3)
Пример #2
0
 def test_team1(self):
     joe.says('!ts join')
     joe.team = b3.TEAM_BLUE
     joe.setvar(self.p, 'switchtarget', 'team')
     fakeConsole.queueEvent(
         b3.events.Event(b3.events.EVT_CLIENT_TEAM_CHANGE, joe.team, joe))
     time.sleep(.1)
     tsclient = self.p.tsGetClient(joe)
     self.assertNotEqual(tsclient, None)
     self.assertEqual(tsclient['cid'], self.p.tsChannelIdTeam1)
 def test_squadsTeam2(self):
     joe.says('!ts join')
     joe.team = b3.TEAM_RED
     joe.setvar(self.p, 'switchtarget', 'squad')
     for i in range(1, 9):
         joe.squad = i
         fakeConsole.queueEvent(b3.events.Event(b3.events.EVT_CLIENT_SQUAD_CHANGE, (joe.team, joe.squad), joe))
         time.sleep(.1)
         tsclient = self.p.tsGetClient(joe)
         self.assertNotEqual(tsclient, None)
         self.assertEqual(tsclient['cid'], self.p.tsChannelIdSquadsTeam2[i])
Пример #4
0
 def test_squadsTeam2(self):
     joe.says('!ts join')
     joe.team = b3.TEAM_RED
     joe.setvar(self.p, 'switchtarget', 'squad')
     for i in range(1, 9):
         joe.squad = i
         fakeConsole.queueEvent(
             b3.events.Event(b3.events.EVT_CLIENT_SQUAD_CHANGE,
                             (joe.team, joe.squad), joe))
         time.sleep(.1)
         tsclient = self.p.tsGetClient(joe)
         self.assertNotEqual(tsclient, None)
         self.assertEqual(tsclient['cid'], self.p.tsChannelIdSquadsTeam2[i])