Skip to content

Commit c35c525

Browse files
asfaltboyzoni
authored andcommitted
Tests: use conftest module to specify testbot fixture location
- imports of testbot are now removed and my linter is happy
1 parent 9a2e3ec commit c35c525

13 files changed

+2
-21
lines changed

conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest_plugins = ['errbot.backends.test']

tests/commands_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import pytest
1111
import tarfile
1212

13-
from errbot.backends.test import testbot # noqa
14-
1513
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'dummy_plugin')
1614

1715

tests/core_plugins_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import os
22

3-
from errbot.backends.test import testbot # noqa
4-
53
extra_plugin_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'room_plugin')
64
extra_config = {'CORE_PLUGINS': ('Help', 'Utils'), 'BOT_ALT_PREFIXES': ('!',), 'BOT_PREFIX': '$'}
75

tests/dependencies_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import os
22

3-
from errbot.backends.test import testbot # noqa
4-
53
extra_plugin_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'dependent_plugins')
64

75

tests/dynaplug_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from os import path
22

3-
from errbot.backends.test import testbot # noqa
4-
53
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'dyna_plugin')
64

75

tests/flow_e2e_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
import pytest
55

6-
from errbot.backends.test import testbot
7-
86
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'flow_plugin')
97

108

tests/i18n_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# -*- coding=utf-8 -*-
22
from os import path
3-
from errbot.backends.test import testbot
4-
53
# This is to test end2end i18n behavior.
64

75
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'i18n_plugin')

tests/mention_test.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from errbot.backends.test import testbot
21
from os import path
32

43
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'mention_plugin')

tests/muc_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22
import errbot.backends.base
3-
from errbot.backends.test import testbot, TestOccupant
3+
from errbot.backends.test import TestOccupant
44
import logging
55
log = logging.getLogger(__name__)
66

tests/plugin_config_fail_test.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
from os import path
22

3-
import pytest
4-
from errbot.backends.test import testbot
5-
63
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'fail_config_plugin')
74

85

tests/plugin_config_test.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from os import path
22

3-
import pytest
4-
from errbot.backends.test import testbot
53

64
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'config_plugin')
75

tests/syntax_test.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from errbot.backends.test import testbot
21
from os import path
32

43
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), 'syntax_plugin')

tests/templates_test.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from os import path
2-
from errbot.backends.test import testbot
32

43
# This is to test end2end i18n behavior.
54

0 commit comments

Comments
 (0)