コード例 #1
0
ファイル: test_name_checker.py プロジェクト: urt30plus/b3
 def test_checkbadnames(self):
     # GIVEN
     p1 = FakeClient(self.console, name="all", guid="p1guid")
     p1.warn = Mock()
     p1.connects("1")
     # WHEN
     self.p.namecheck()
     # THEN
     p1.warn.assert_has_calls([call(ANY, ANY, 'badname', None, '')])
コード例 #2
0
 def test_cmd_spamins_uppercase(self):
     # GIVEN
     mike = FakeClient(self.console, name="Mike")
     mike.connects("3")
     # WHEN
     self.superadmin.clearMessageHistory()
     self.superadmin.says("!spamins MIKE")
     # THEN
     self.assertListEqual(['Mike currently has 0 spamins, peak was 0'], self.superadmin.message_history)
コード例 #3
0
ファイル: test_keywords.py プロジェクト: urt30plus/b3
 def test_regulars(self):
     # GIVEN
     joe = FakeClient(self.console, name="Joe", guid="joeguid", groupBits=2)
     joe.connects(0)
     when(self.p.admin_plugin).getRegulars().thenReturn([joe])
     with patch.object(self.console, "say") as say_mock:
         # WHEN
         self.p.print_ad('@regulars')
     # THEN
     say_mock.assert_has_calls([call('^7Regular players online: Joe^7')])
コード例 #4
0
ファイル: test_name_checker.py プロジェクト: urt30plus/b3
 def test_checkdupes_with_player_reconnecting(self):
     # GIVEN
     p1 = FakeClient(self.console, name="sameName", guid="p1guid")
     p1.warn = Mock()
     p1.connects("1")
     # WHEN
     p1.disconnects()
     p1.connects("2")
     self.p.namecheck()
     # THEN
     self.assertFalse(p1.warn.called)
コード例 #5
0
ファイル: test_keywords.py プロジェクト: urt30plus/b3
 def test_nextmap(self):
     when(self.console).getNextMap().thenReturn("f00")
     joe = FakeClient(self.console,
                      name="Joe",
                      guid="joeguid",
                      groupBits=128)
     joe.connects(0)
     with patch.object(self.console, "say") as say_mock:
         # WHEN
         self.p.print_ad('@nextmap')
     # THEN
     say_mock.assert_has_calls([call('^2Next map: ^3f00')])
コード例 #6
0
ファイル: test_keywords.py プロジェクト: urt30plus/b3
 def test_time(self):
     when(self.console).formatTime(ANY()).thenReturn("f00")
     joe = FakeClient(self.console,
                      name="Joe",
                      guid="joeguid",
                      groupBits=128)
     joe.connects(0)
     with patch.object(self.console, "say") as say_mock:
         # WHEN
         self.p.print_ad('@time')
     # THEN
     say_mock.assert_has_calls([call('^2Time: ^3f00')])
コード例 #7
0
ファイル: test_keywords.py プロジェクト: urt30plus/b3
 def test_admins(self):
     # GIVEN
     joe = FakeClient(self.console,
                      name="Joe",
                      guid="joeguid",
                      groupBits=128)
     joe.connects(0)
     when(self.p.admin_plugin).getAdmins().thenReturn([joe])
     with patch.object(self.console, "say") as say_mock:
         # WHEN
         self.p.print_ad('@admins')
     # THEN
     say_mock.assert_has_calls([call('^7Admins online: Joe^7^7 [^3100^7]')])
コード例 #8
0
ファイル: test_name_checker.py プロジェクト: urt30plus/b3
 def test_checkdupes_with_dup(self):
     # GIVEN
     p1 = FakeClient(self.console, name="sameName", guid="p1guid")
     p1.warn = Mock()
     p1.connects("1")
     p2 = FakeClient(self.console, name="sameName", guid="p2guid")
     p2.warn = Mock()
     p2.connects("2")
     # WHEN
     self.assertTrue(p1.name == p2.name)
     self.p.namecheck()
     # THEN
     p1.warn.assert_has_calls([call(ANY, ANY, 'badname', None, '')])
     p2.warn.assert_has_calls([call(ANY, ANY, 'badname', None, '')])
コード例 #9
0
ファイル: test_name_checker.py プロジェクト: urt30plus/b3
 def test_checkdupes_no_dup(self):
     # GIVEN
     p1 = FakeClient(self.console, name="theName", guid="p1guid")
     p1.warn = Mock()
     p1.connects("1")
     p2 = FakeClient(self.console, name="anotherName", guid="p2guid")
     p2.warn = Mock()
     p2.connects("2")
     # WHEN
     self.assertFalse(p1.name == p2.name)
     self.p.namecheck()
     # THEN
     self.assertFalse(p1.warn.called)
     self.assertFalse(p2.warn.called)
コード例 #10
0
class StatPluginTestCase(B3TestCase):
    def setUp(self):
        B3TestCase.setUp(self)

        with logging_disabled():
            admin_conf = CfgConfigParser()
            admin_plugin = AdminPlugin(self.console, admin_conf)
            admin_plugin.onLoadConfig()
            admin_plugin.onStartup()
            when(self.console).getPlugin('admin').thenReturn(admin_plugin)

        conf = CfgConfigParser()
        conf.loadFromString(
            dedent(r"""
            [commands]
            mapstats-stats: 0
            testscore-ts: 0
            topstats-top: 0
            topxp: 0

            [settings]
            startPoints: 100
            resetscore: no
            resetxp: no
            show_awards: no
            show_awards_xp: no
        """))
        self.p = StatsPlugin(self.console, conf)
        self.p.onLoadConfig()
        self.p.onStartup()

        self.joe = FakeClient(self.console,
                              name="Joe",
                              guid="joeguid",
                              groupBits=1,
                              team=TEAM_RED)
        self.mike = FakeClient(self.console,
                               name="Mike",
                               guid="mikeguid",
                               groupBits=1,
                               team=TEAM_RED)
        self.joe.connects(1)
        self.mike.connects(2)
コード例 #11
0
class Test_plugin(SpamcontrolTestCase):

    def setUp(self):
        SpamcontrolTestCase.setUp(self)

        self.adminPlugin = AdminPlugin(self.console, '@b3/conf/plugin_admin.ini')
        when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
        self.adminPlugin.onLoadConfig()
        self.adminPlugin.onStartup()

        with open(b3.functions.getAbsolutePath('@b3/conf/plugin_spamcontrol.ini')) as default_conf:
            self.init_plugin(default_conf.read())

        self.joe = FakeClient(self.console, name="Joe", guid="zaerezarezar", groupBits=1)
        self.joe.connects("1")

        self.superadmin = FakeClient(self.console, name="Superadmin", guid="superadmin_guid", groupBits=128)
        self.superadmin.connects("2")

    def assertSpaminsPoints(self, client, points):
        actual = client.var(self.p, 'spamins', 0).value
        self.assertEqual(points, actual, "expecting %s to have %s spamins points" % (client.name, points))

    def test_say(self):
        when(self.p).getTime().thenReturn(0).thenReturn(1).thenReturn(20).thenReturn(120)

        self.assertSpaminsPoints(self.joe, 0)

        self.joe.says("doh")  # 0s
        self.assertSpaminsPoints(self.joe, 2)

        self.joe.says("foo")  # 1s
        self.assertSpaminsPoints(self.joe, 4)

        self.joe.says("bar")  # 20s
        self.assertSpaminsPoints(self.joe, 3)

        self.joe.says("hi")  # 120s
        self.assertSpaminsPoints(self.joe, 0)
コード例 #12
0
class Test_game_specific_spam(SpamcontrolTestCase):

    def setUp(self):
        SpamcontrolTestCase.setUp(self)

        with open(getAbsolutePath('@b3/conf/plugin_spamcontrol.ini')) as default_conf:
            self.init_plugin(default_conf.read())

        self.joe = FakeClient(self.console, name="Joe", exactName="Joe", guid="zaerezarezar", groupBits=1)
        self.joe.connects("1")

        # let's say our game has a new event : EVT_CLIENT_RADIO
        EVT_CLIENT_RADIO = self.console.Events.createEvent('EVT_CLIENT_RADIO', 'Event client radio')

        # teach the Spamcontrol plugin how to react on such events
        def onRadio(this, event):
            new_event = Event(type=event.type, client=event.client, target=event.target, data=event.data['text'])
            this.onChat(new_event)

        self.p.onRadio = MethodType(onRadio, self.p)
        self.p.registerEvent('EVT_CLIENT_RADIO', self.p.onRadio)

        # patch joe to make him able to send radio messages
        def radios(me, text):
            me.console.queueEvent(Event(type=EVT_CLIENT_RADIO, client=me, data={'text': text}))

        self.joe.radios = MethodType(radios, self.joe)

    def test_radio_spam(self):
        when(self.p).getTime().thenReturn(0)
        self.joe.warn = Mock()
        self.joe.says("doh 1")
        self.joe.radios("doh 2")
        self.joe.says("doh 3")
        self.joe.radios("doh 4")
        self.joe.says("doh 5")
        self.assertEqual(1, self.joe.warn.call_count)
コード例 #13
0
ファイル: __init__.py プロジェクト: urt30plus/b3
class NaderPluginTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        with logging_disabled():
            from b3.parsers.iourt43 import Iourt43Parser
            from tests.fake import FakeConsole
            Iourt43Parser.__bases__ = (FakeConsole, )
            # Now parser inheritance hierarchy is :
            # Iourt43Parser -> abstractParser -> FakeConsole -> Parser

    def setUp(self):
        # create a Iourt43 parser
        parser_conf = XmlConfigParser()
        parser_conf.loadFromString(
            dedent(r"""
            <configuration>
                <settings name="server">
                    <set name="game_log"></set>
                </settings>
            </configuration>
        """))

        self.parser_conf = MainConfig(parser_conf)
        self.console = Iourt43Parser(self.parser_conf)

        # initialize some fixed cvars which will be used by both the plugin and the iourt42 parser
        when(self.console).getCvar('auth').thenReturn(Cvar('auth', value='0'))
        when(self.console).getCvar('auth_owners').thenReturn(None)
        when(self.console).getCvar('fs_basepath').thenReturn(
            Cvar('fs_basepath', value='/fake/basepath'))
        when(self.console).getCvar('fs_homepath').thenReturn(
            Cvar('fs_homepath', value='/fake/homepath'))
        when(self.console).getCvar('fs_game').thenReturn(
            Cvar('fs_game', value='q3ut4'))
        when(self.console).getCvar('gamename').thenReturn(
            Cvar('gamename', value='q3urt43'))

        # start the parser
        self.console.startup()

        with logging_disabled():
            self.adminPlugin = AdminPlugin(self.console,
                                           '@b3/conf/plugin_admin.ini')
            self.adminPlugin.onLoadConfig()
            self.adminPlugin.onStartup()

        # make sure the admin plugin obtained by other plugins is our admin plugin
        when(self.console).getPlugin('admin').thenReturn(self.adminPlugin)

        self.conf = CfgConfigParser()
        self.conf.loadFromString(
            dedent(r"""
            [settings]
            enabled: on
            minlevel: 40
            nbtop: 5
            
            [messages]
            msg_5: ^3$name ^4$score ^7HE grenade kills!
        """))

        self.p = NaderPlugin(self.console, self.conf)
        self.p.onLoadConfig()
        self.p.onStartup()

        with logging_disabled():
            from tests.fake import FakeClient

        # create some clients
        self.mike = FakeClient(console=self.console,
                               name="Mike",
                               guid="mikeguid",
                               team=TEAM_BLUE,
                               groupBits=1)
        self.mark = FakeClient(console=self.console,
                               name="Mark",
                               guid="markguid",
                               team=TEAM_BLUE,
                               groupBits=1)
        self.bill = FakeClient(console=self.console,
                               name="Bill",
                               guid="billguid",
                               team=TEAM_RED,
                               groupBits=1)
        self.mike.connects("1")
        self.bill.connects("2")
        self.mark.connects("3")

    def tearDown(self):
        self.console.shutdown()
        self.mike.disconnects()
        self.bill.disconnects()
        self.mark.disconnects()
コード例 #14
0
class Test_commands(SpamcontrolTestCase):

    def setUp(self):
        SpamcontrolTestCase.setUp(self)

        self.adminPlugin = AdminPlugin(self.console, '@b3/conf/plugin_admin.ini')
        when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
        self.adminPlugin.onLoadConfig()
        self.adminPlugin.onStartup()

        with open(b3.functions.getAbsolutePath('@b3/conf/plugin_spamcontrol.ini')) as default_conf:
            self.init_plugin(default_conf.read())

        self.joe = FakeClient(self.console, name="Joe", guid="zaerezarezar", groupBits=1)
        self.joe.connects("1")

        self.superadmin = FakeClient(self.console, name="Superadmin", guid="superadmin_guid", groupBits=128)
        self.superadmin.connects("2")

    def test_cmd_spamins(self):
        # GIVEN
        when(self.p).getTime().thenReturn(0).thenReturn(3).thenReturn(4).thenReturn(4).thenReturn(500)
        self.joe.says("doh")  # 0s
        self.joe.says("doh")  # 3s
        self.joe.says("doh")  # 4s
        # WHEN
        self.superadmin.clearMessageHistory()
        self.superadmin.says("!spamins joe")
        # THEN
        self.assertListEqual(['Joe currently has 9 spamins, peak was 9'], self.superadmin.message_history)  # 4s
        # WHEN
        self.superadmin.clearMessageHistory()
        self.superadmin.says("!spamins joe")
        self.assertListEqual(['Joe currently has 0 spamins, peak was 9'], self.superadmin.message_history)  # 500s

    def test_cmd_spamins_lowercase(self):
        # GIVEN
        mike = FakeClient(self.console, name="Mike")
        mike.connects("3")
        # WHEN
        self.superadmin.clearMessageHistory()
        self.superadmin.says("!spamins mike")
        # THEN
        self.assertListEqual(['Mike currently has 0 spamins, peak was 0'], self.superadmin.message_history)

    def test_cmd_spamins_uppercase(self):
        # GIVEN
        mike = FakeClient(self.console, name="Mike")
        mike.connects("3")
        # WHEN
        self.superadmin.clearMessageHistory()
        self.superadmin.says("!spamins MIKE")
        # THEN
        self.assertListEqual(['Mike currently has 0 spamins, peak was 0'], self.superadmin.message_history)

    def test_cmd_spamins_unknown_player(self):
        # WHEN
        self.superadmin.clearMessageHistory()
        self.superadmin.says("!spamins nobody")
        # THEN
        self.assertListEqual(['No players found matching nobody'], self.superadmin.message_history)

    def test_cmd_spamins_no_argument(self):
        # GIVEN
        self.console.getPlugin('admin')._warn_command_abusers = True
        # WHEN
        self.joe.clearMessageHistory()
        self.joe.says("!spamins")
        # THEN
        self.assertListEqual(['You need to be in group Moderator to use !spamins'], self.joe.message_history)
        # WHEN
        self.superadmin.says("!putgroup joe mod")
        self.joe.clearMessageHistory()
        self.joe.says("!spamins")
        # THEN
        self.assertListEqual(['Joe is too cool to spam'], self.joe.message_history)

    def test_joe_gets_warned(self):
        # GIVEN
        when(self.p).getTime().thenReturn(0)
        self.joe.warn = Mock()

        # WHEN
        self.joe.says("doh 1")
        self.joe.says("doh 2")
        self.joe.says("doh 3")
        self.joe.says("doh 4")
        self.joe.says("doh 5")

        # THEN
        self.assertEqual(1, self.joe.warn.call_count)
コード例 #15
0
class Test_cmd_balance(Iourt43TestCase):
    def setUp(self):
        super(Test_cmd_balance, self).setUp()
        self.conf = CfgConfigParser()
        self.conf.loadFromString(
            dedent("""
        [commands]
        pabalance-balance: 1

        [skillbalancer]
        min_bal_interval: 1
        interval: 0
        difference: 0.5
        mode: 2
        """))
        self.p = PoweradminurtPlugin(self.console, self.conf)
        self.init_default_cvar()
        self.p.onLoadConfig()
        self.p.onStartup()

        self.console.say = Mock()
        self.console.write = Mock()

        with logging_disabled():
            from tests.fake import FakeClient
            self.blue1 = FakeClient(self.console,
                                    name="Blue1",
                                    guid="zaerezarezar",
                                    groupBits=1,
                                    team=TEAM_BLUE)
            self.blue2 = FakeClient(self.console,
                                    name="Blue2",
                                    guid="qsdfdsqfdsqf",
                                    groupBits=1,
                                    team=TEAM_BLUE)
            self.blue3 = FakeClient(self.console,
                                    name="Blue3",
                                    guid="qsdfdsqfdsqf33",
                                    groupBits=1,
                                    team=TEAM_BLUE)
            self.blue4 = FakeClient(self.console,
                                    name="Blue4",
                                    guid="sdf455ezr",
                                    groupBits=1,
                                    team=TEAM_BLUE)
            self.red1 = FakeClient(self.console,
                                   name="Red1",
                                   guid="875sasda",
                                   groupBits=1,
                                   team=TEAM_RED)
            self.red2 = FakeClient(self.console,
                                   name="Red2",
                                   guid="f4qfer654r",
                                   groupBits=1,
                                   team=TEAM_RED)

        # connect clients
        self.blue1.connects('1')
        self.blue2.connects('2')
        self.blue3.connects('3')
        self.blue4.connects('4')
        self.red1.connects('5')
        self.red2.connects('6')

        self.p.countteams = Mock(return_value=True)
        self.p._teamred = 2
        self.p._teamblue = 4

    def test_balancing_already_done(self):
        # GIVEN
        self.blue1.clearMessageHistory()
        self.p._lastbal = 0
        self.p.ignoreCheck = Mock(return_value=True)
        self.console.time = Mock(return_value=10)
        # WHEN
        self.blue1.says('!balance')
        # THEN
        self.assertEqual(self.blue1.message_history,
                         ['Teams changed recently, please wait a while'])

    def test_non_round_based_gametype(self):
        # GIVEN
        self.blue1.clearMessageHistory()
        self.p._lastbal = 0
        self.p.ignoreCheck = Mock(return_value=False)
        self.console.time = Mock(return_value=120)
        self.console.game.gameType = 'tdm'
        # WHEN
        self.blue1.says('!balance')
        # THEN
        self.console.write.assert_has_calls(
            [call('bigtext "Balancing teams!"')])

    def test_round_based_gametype_delayed_announce_only(self):
        # GIVEN
        self.blue1.clearMessageHistory()
        self.p._lastbal = 0
        self.p.ignoreCheck = Mock(return_value=False)
        self.console.time = Mock(return_value=120)
        self.console.game.gameType = 'bm'
        # WHEN
        self.blue1.says('!balance')
        # THEN
        self.assertEqual(self.blue1.message_history,
                         ['Teams will be balanced at the end of this round'])
        self.assertFalse(self.p._pending_teambalance)
        self.assertTrue(self.p._pending_skillbalance)
        self.assertEqual(self.p.cmd_pabalance, self.p._skillbalance_func)

    def test_round_based_gametype_delayed_execution(self):
        # GIVEN
        self.blue1.clearMessageHistory()
        self.p._lastbal = 0
        self.p.ignoreCheck = Mock(return_value=False)
        self.console.time = Mock(return_value=120)
        self.console.game.gameType = 'bm'
        self.blue1.says('!balance')
        self.assertEqual(self.blue1.message_history,
                         ['Teams will be balanced at the end of this round'])
        self.assertFalse(self.p._pending_teambalance)
        self.assertTrue(self.p._pending_skillbalance)
        self.assertEqual(self.p.cmd_pabalance, self.p._skillbalance_func)
        # WHEN
        self.console.queueEvent(self.console.getEvent('EVT_GAME_ROUND_END'))
        # THEN
        self.console.write.assert_has_calls(
            [call('bigtext "Balancing teams!"')])
        self.assertFalse(self.p._pending_teambalance)
        self.assertFalse(self.p._pending_skillbalance)
        self.assertIsNone(self.p._skillbalance_func)
コード例 #16
0
class Test_welcome(Welcome_functional_test):

    def setUp(self):
        Welcome_functional_test.setUp(self)
        self.load_config()
        # disabled event handling (spawns threads and is of no use for that test)
        self.p.onEvent = lambda *args, **kwargs: None

        self.client = FakeClient(console=self.console, name="Jack", guid="JackGUID")
        self.client._connections = 0
        self.client.greeting = 'hi everyone :)'
        self.client.connects("0")
        self.superadmin.connects("1")

        self.say_patcher = patch.object(self.console, "say")
        self.say_mock = self.say_patcher.start()

    def tearDown(self):
        Welcome_functional_test.tearDown(self)
        self.say_patcher.stop()

    def Test_get_client_info(self):
        self.parser_conf.add_section('b3')
        self.parser_conf.set('b3', 'time_zone', 'UTC')
        self.parser_conf.set('b3', 'time_format', '%I:%M%p %Z %m/%d/%y')
        self.assertDictEqual({'connections': '1',
                              'group': 'Super Admin',
                              'id': '2',
                              'lastVisit': 'Unknown',
                              'level': '100',
                              'name': u'SuperAdmin^7'}, self.p.get_client_info(self.superadmin))
        # WHEN
        self.superadmin.lastVisit = 1364821993
        self.superadmin._connections = 2
        # THEN
        self.assertDictEqual({'connections': '2',
                              'group': u'Super Admin',
                              'id': '2',
                              'lastVisit': '02:13PM CET 04/01/13',
                              'level': '100',
                              'name': 'SuperAdmin^7'}, self.p.get_client_info(self.superadmin))
        # WHEN
        self.superadmin.says("!mask mod")
        # THEN
        self.assertDictEqual({'connections': '2',
                              'group': u'Moderator',
                              'id': '2',
                              'lastVisit': '02:13PM CET 04/01/13',
                              'level': '20',
                              'name': 'SuperAdmin^7'}, self.p.get_client_info(self.superadmin))

    def test_0(self):
        # GIVEN
        self.p._welcomeFlags = 0
        # WHEN
        self.p.welcome(self.superadmin)
        # THEN
        self.assertListEqual([], self.say_mock.mock_calls)
        self.assertListEqual([], self.superadmin.message_history)

    def test_first(self):
        # GIVEN
        self.client._connections = 0
        self.p._welcomeFlags = F_FIRST
        # WHEN
        self.p.welcome(self.client)
        # THEN
        self.assertListEqual([], self.say_mock.mock_calls)
        self.assertListEqual(['Welcome Jack, this must be your first visit, you are player #1. Type !help for '
                              'help'], self.client.message_history)

    def test_newb(self):
        # GIVEN
        self.client._connections = 2
        self.p._welcomeFlags = F_NEWB
        # WHEN
        self.p.welcome(self.client)
        # THEN
        self.assertListEqual([], self.say_mock.mock_calls)
        self.assertListEqual(['[Authed] Welcome back Jack [@1], last visit Unknown. Type !register in chat to register.'
                              ' Type !help for help'], self.client.message_history)

    def test_user(self):
        # GIVEN
        self.client._connections = 2
        self.p._welcomeFlags = F_USER
        self.client.says("!register")
        self.client.clearMessageHistory()
        # WHEN
        self.p.welcome(self.client)
        # THEN
        self.assertListEqual([call(u'^7Jack^7 ^7put in group User')], self.say_mock.mock_calls)
        self.assertListEqual(["[Authed] Welcome back Jack [@1], last visit Unknown, you're a User, played 2 times"],
                             self.client.message_history)

    def test_announce_first(self):
        # GIVEN
        self.client._connections = 0
        self.p._welcomeFlags = F_ANNOUNCE_FIRST
        # WHEN
        self.p.welcome(self.client)
        # THEN
        self.assertListEqual([call('^7Everyone welcome Jack^7^7, player number ^3#1^7, to the server')],
                             self.say_mock.mock_calls)
        self.assertListEqual([], self.client.message_history)

    def test_announce_user(self):
        # GIVEN
        self.client._connections = 2
        self.p._welcomeFlags = F_ANNOUNCE_USER
        self.client.says("!register")
        self.client.clearMessageHistory()
        # WHEN
        self.p.welcome(self.client)
        # THEN
        self.assertListEqual([call(u'^7Jack^7 ^7put in group User'),
                              call('^7Everyone welcome back Jack^7^7, player number ^3#1^7, to the server, played 2 '
                                   'times')], self.say_mock.mock_calls)
        self.assertListEqual([], self.client.message_history)

    def test_custom_greeting(self):
        # GIVEN
        self.client._connections = 2
        self.p._welcomeFlags = F_CUSTOM_GREETING
        self.client.says("!register")
        self.client.clearMessageHistory()
        # WHEN
        self.p.welcome(self.client)
        # THEN
        self.assertListEqual([call(u'^7Jack^7 ^7put in group User'), call('^7Jack^7^7 joined: hi everyone :)')],
                             self.say_mock.mock_calls)
        self.assertListEqual([], self.client.message_history)