def test_PLAYER_CHAT_team(self):  # 3
     # GIVEN
     player = FakeClient(self.parser, name="Pheonix", guid="76561198038608801")
     player.connects("1")
     self.clear_events()
     player.team = 0  # ugly, until chiv team ids got converted into b3 team ids
     # WHEN
     self.parser.handlePacket(Packet.decode(
         '\x00\x03\x00\x00\x00\x17\x01\x10\x00\x01\x04\xabk\xa1\x00\x00\x00\x07 sorry \x00\x00\x00\x00'))
     # THEN
     self.assert_has_event("EVT_CLIENT_TEAM_SAY", data='sorry', client=player)
 def test_PLAYER_CHAT_team(self):  # 3
     # GIVEN
     player = FakeClient(self.parser,
                         name="Pheonix",
                         guid="76561198038608801")
     player.connects("1")
     self.clear_events()
     player.team = 0  # ugly, until chiv team ids got converted into b3 team ids
     # WHEN
     self.parser.handlePacket(
         Packet.decode(
             '\x00\x03\x00\x00\x00\x17\x01\x10\x00\x01\x04\xabk\xa1\x00\x00\x00\x07 sorry \x00\x00\x00\x00'
         ))
     # THEN
     self.assert_has_event("EVT_CLIENT_TEAM_SAY",
                           data='sorry',
                           client=player)
Example #3
0
time.sleep(.5)
me.says('!ts disjoin')

time.sleep(.5)
me.says('!ts')

time.sleep(.5)
me.says('!ts join')

time.sleep(.5)
me.says('!tsauto team')

time.sleep(.5)
p.tsTellClient(tsclient['clid'], "Going to spec")
me.team = TEAM_SPEC

time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going to blue team")
me.team = TEAM_BLUE

time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going to red team")
me.team = TEAM_RED

time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going in no team")
me.team = TEAM_FREE

time.sleep(1)
me.says('!tsauto off')
time.sleep(.5)
me.says('!ts disjoin')

time.sleep(.5)
me.says('!ts')

time.sleep(.5)
me.says('!ts join')

time.sleep(.5)
me.says('!tsauto on')

time.sleep(.5)
p.tsTellClient(tsclient['clid'], "Going to spec")
me.team = TEAM_SPEC

time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going to blue team")
me.team = TEAM_BLUE

time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going to red team")
me.team = TEAM_RED

time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going in no team")
me.team = TEAM_FREE

time.sleep(1)
me.says('!tsauto off')