Newer
Older
# SPDX-FileCopyrightText: 2018-2021 Bruce Cowan <bruce@bcowan.me.uk>
import queue
import pytest
pytest_plugins = ["errbot.backends.test"]
extra_plugin_dir = '.'
testbot.assertInCommand("test++", "Karma for 'test' is now 1")
testbot.assertInCommand("!karma test", "Karma for 'test' is 1")
testbot.assertInCommand("test--", "Karma for 'test' is now 0")
testbot.assertInCommand("!karma test", "Karma for 'test' is 0")
testbot.assertInCommand("high++", "Karma for 'high' is now 1")
testbot.assertInCommand("high++", "Karma for 'high' is now 2")
testbot.assertInCommand("medium++", "Karma for 'medium' is now 1")
testbot.assertInCommand("low--", "Karma for 'low' is now -1")
testbot.assertInCommand("!karma top", "high: 2, medium: 1, low: -1")
testbot.assertInCommand("!karma bottom", "low: -1, medium: 1, high: 2")
testbot.assertInCommand("!karma top 1", "high: 2")
testbot.assertInCommand("!karma top 2", "high: 2, medium: 1")
def test_cpp(testbot):
testbot.push_message("c++ is horrible")
with pytest.raises(queue.Empty):
testbot.pop_message(1)
with pytest.raises(queue.Empty):
testbot.pop_message(1)