Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/l/a/lalita-0.1.1/lalita/plugins/tests/test_example.py   lalita(Download)
    def test_talkedtome(self):
        '''Check 'talked to me' functionality.'''
        self.disp.push(events.TALKED_TO_ME, "Usr", "chnl", "mensaje")
        self.assertEqual(self.answer[0][1],
                         u"Hola Usr, mi nombre es TestBot, :)")

src/l/a/lalita-0.1.1/lalita/ircbot.py   lalita(Download)
            if msg[0] in (":", " ", ","):
                msg = msg[1:].strip()
                self.dispatcher.push(events.TALKED_TO_ME, user, channel, msg)
        elif msg[0] == '@':
            args = msg.split()

src/l/a/lalita-0.1.1/lalita/plugins/tests/test_seen.py   lalita(Download)
    def test_talked_to_me(self):
        '''Logs talked_to_me.'''
        self.disp.push(events.TALKED_TO_ME, "pepe", "channel", "blah")
        self.assertEqual(self.plugin.saidlog["pepe"][0], "blah")
        self.assertEqual(self.plugin.iolog, {})

src/l/a/lalita-0.1.1/lalita/core/tests/test_events.py   lalita(Download)
    def test_privmsg_talkedtome1(self):
        '''Calling bot.privmsg when talking to self using ":"'''
        bot.privmsg("user", "chnl", MY_NICKNAME + ":" + "blah    ")
        self.check_pushed(events.TALKED_TO_ME, "user", "chnl", "blah")
        return self.deferred
 
    def test_privmsg_talkedtome2(self):
        '''Calling bot.privmsg when talking to self using " "'''
        bot.privmsg("user", "chnl", MY_NICKNAME + " " + "blah")
        self.check_pushed(events.TALKED_TO_ME, "user", "chnl", "blah")
    def test_privmsg_talkedtome3(self):
        '''Calling bot.privmsg when talking to self using ","'''
        bot.privmsg("user", "chnl", MY_NICKNAME + "," + "    blah")
        self.check_pushed(events.TALKED_TO_ME, "user", "chnl", "blah")
        return self.deferred

src/l/a/lalita-0.1.1/lalita/core/tests/test_dispatcher.py   lalita(Download)
        self.helper.test = test
 
        self.disp.register(events.TALKED_TO_ME, self.helper.f)
        self.disp.push(events.TALKED_TO_ME, "user", "channel", "msg")
        return self.deferred
 
        regexp = re.compile("^hola.*$")
        self.disp.register(events.TALKED_TO_ME, self.helper.f, regexp)
        self.disp.push(events.TALKED_TO_ME, "user", "channel", "esta no pasa")
        self.disp.push(events.TALKED_TO_ME, "user", "channel", "hola mundo")