File: multi_plugin_test.py

package info (click to toggle)
errbot 6.2.0%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,848 kB
  • sloc: python: 11,573; makefile: 162; sh: 97
file content (17 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from os import path

extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), "multi_plugin")

# This tests the decorellation between plugin class names and real names
# by making 2 instances of the same plugin collide on purpose.


def test_first(testbot):
    r = testbot.exec_command("!myname")
    assert "Multi1" == r or "Multi2" == r


def test_second(testbot):
    assert "Multi2" == testbot.exec_command(
        "!multi2-myname"
    ) or "Multi1" == testbot.exec_command("!multi1-myname")