diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2017-09-15 16:44:57 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2017-09-15 16:48:53 +0200 |
commit | 53749592c8443f13879ea9264a22eea150ca9f47 (patch) | |
tree | f9cb0c63fc3a236c4ae0024d2b75698fc0f33343 /_pytest | |
parent | 5608e22cdeb9ba3a07e2925fc97bb47bcbbc17da (diff) | |
download | wee-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')
-rw-r--r-- | _pytest/conftest.py | 2 | ||||
-rw-r--r-- | _pytest/test_linkifytext.py | 2 |
2 files changed, 2 insertions, 2 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() diff --git a/_pytest/test_linkifytext.py b/_pytest/test_linkifytext.py index 010a48b..56bf1b5 100644 --- a/_pytest/test_linkifytext.py +++ b/_pytest/test_linkifytext.py @@ -6,7 +6,7 @@ from wee_slack import linkify_text # assert False -def test_linkifytext_does_partial_html_entity_encoding(mock_weechat, realish_eventrouter): +def test_linkifytext_does_partial_html_entity_encoding(realish_eventrouter): team = realish_eventrouter.teams.values()[0] channel = team.channels.values()[0] |