示例#1
0
    def test_drop_false_username(self, config, bot, update):
        username = "******"
        pinger = Pinger(config)

        pinger.drop(bot, update, [username])

        assert "not found" in bot.get_message()
示例#2
0
    def test_drop_from_admin(self, config, bot, update):
        username = "******"
        pinger = Pinger(config)

        pinger.drop(bot, update, [username])

        assert "deleted" in bot.get_message()
示例#3
0
    def test_drop_no_admin(self, config, bot, update):
        update.set_message("", username="******")
        username = "******"
        pinger = Pinger(config)

        pinger.drop(bot, update, [username])

        assert "allowed for admins" in bot.get_message()
示例#4
0
    def test_drop_empty(self, config, bot, update):
        pinger = Pinger(config)

        pinger.drop(bot, update, [])

        assert "Usage" in bot.get_message()