Пример #1
0
    def test_add_not_for_me_not_admin(self, config, bot, update):
        update.set_message("", username="******")
        username = "******"
        match = "тулук"
        pinger = Pinger(config)

        pinger.add(bot, update, [username, match])
Пример #2
0
    def test_add_no_matches(self, config, bot, update):
        update.set_message("", username="******")
        pinger = Pinger(config)

        pinger.add(bot, update, [])

        assert "Usage" in bot.get_message()
Пример #3
0
    def test_add_for_me_not_admin(self, config, bot, update):
        update.set_message("", username="******")
        match = "тулук"
        pinger = Pinger(config)

        pinger.add(bot, update, [match])

        assert "added" in bot.get_message()
Пример #4
0
    def test_add_eleventh_match_admin(self, config, bot, update):
        username = "******"
        match = "eleven"

        pinger = Pinger(config)

        pinger.add(bot, update, [username, match])

        assert "has been added" in bot.get_message()
Пример #5
0
    def test_add_eleventh_match_no_admin(self, config, bot, update):
        update.set_message("", username="******")
        username = "******"
        match = "eleven"

        pinger = Pinger(config)

        pinger.add(bot, update, [username, match])

        assert "only 10 matches" in bot.get_message()