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])
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()
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()
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()
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()