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

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

src/l/a/lala-0.3/test/test_plugins.py   lala(Download)
    def test_autorelaod(self):
        lala.plugins.roulette.gun.bullet = 6
        lala.plugins.roulette.gun.chamber = 5
        lala.pluginmanager._handle_message("user", "#channel", "!shoot")
        lala.util.msg.assert_called_with("#channel", "Reloading")
                    lala.util.msg.assert_any_call("#channel", "Reloading")
                else:
                    lala.util.msg.assert_called_with("#channel",
                                  "user: Chamber %s of 6: *click*" % i)
            lala.util.msg.reset_mock()
        lala.pluginmanager._handle_message("user", "#channel", "!delquote 1")
        lala.plugins.quotes.db_connection.runInteraction._fire()
        lala.util.msg.assert_called_with("#channel",
            "It doesn't look like quote #1 exists.")
 
        lala.pluginmanager._handle_message("user", "#channel", "!delquote 1")
        lala.plugins.quotes.db_connection.runInteraction._fire()
        lala.util.msg.assert_called_with("#channel",
            "Quote #1 has been deleted.")
 
        lala.pluginmanager._handle_message("user", "#channel", "!getquote 1")
        lala.plugins.quotes.db_connection.runQuery._fire()
        lala.util.msg.assert_called_with("#channel",
                lala.plugins.quotes.MESSAGE_TEMPLATE % data[0])