aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/conftest.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2017-09-15 16:44:57 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2017-09-15 16:48:53 +0200
commit53749592c8443f13879ea9264a22eea150ca9f47 (patch)
treef9cb0c63fc3a236c4ae0024d2b75698fc0f33343 /_pytest/conftest.py
parent5608e22cdeb9ba3a07e2925fc97bb47bcbbc17da (diff)
downloadwee-slack-53749592c8443f13879ea9264a22eea150ca9f47.tar.gz
test: Make mock_weechat a dependency of realish_eventrouter
Setting up the eventrouter for the tests involves code that requires the config object to be set, so it has to depend on mock_weechat. This didn't cause a problem when all the tests were run since the first test depends on mock_weechat so it would be set up. However, if you tried to run a single test that depended on realish_eventrouter, but not mock_weechat, it would fail.
Diffstat (limited to '_pytest/conftest.py')
-rw-r--r--_pytest/conftest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/_pytest/conftest.py b/_pytest/conftest.py
index 43d4a74..4f94983 100644
--- a/_pytest/conftest.py
+++ b/_pytest/conftest.py
@@ -26,7 +26,7 @@ def mock_websocket():
return fakewebsocket()
@pytest.fixture
-def realish_eventrouter():
+def realish_eventrouter(mock_weechat):
e = EventRouter()
context = e.store_context(SlackRequest('xoxoxoxox', "rtm.start", {"meh": "blah"}))
rtmstartdata = open('_pytest/data/http/rtm.start.json', 'r').read()