diff options
author | Tollef Fog Heen <tfheen@err.no> | 2017-09-18 21:33:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 21:33:06 +0200 |
commit | b075750bb5340525cd8e5b23e28f4abd2f330c6b (patch) | |
tree | 0deec7966dce1b5ee021df58c5f99401002f5aca | |
parent | a4c4dd77c8568d4139fdace7866af2ac2a590f59 (diff) | |
parent | 20031138aa96aa404312f228d042d3169320136d (diff) | |
download | wee-slack-b075750bb5340525cd8e5b23e28f4abd2f330c6b.tar.gz |
Merge pull request #434 from trygveaa/test/fix-broken-tests
Fix broken tests
-rw-r--r-- | _pytest/conftest.py | 5 | ||||
-rw-r--r-- | _pytest/test_everything.py | 2 | ||||
-rw-r--r-- | _pytest/test_linkifytext.py | 2 | ||||
-rw-r--r-- | _pytest/test_presencechange.py | 2 | ||||
-rw-r--r-- | _pytest/test_process_message.py | 2 | ||||
-rw-r--r-- | _pytest/test_processreply.py | 2 | ||||
-rw-r--r-- | _pytest/test_processteamjoin.py | 2 | ||||
-rw-r--r-- | _pytest/test_sendmessage.py | 2 |
8 files changed, 10 insertions, 9 deletions
diff --git a/_pytest/conftest.py b/_pytest/conftest.py index 43d4a74..232814f 100644 --- a/_pytest/conftest.py +++ b/_pytest/conftest.py @@ -26,12 +26,13 @@ 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() e.receive_httprequest_callback(context, 1, 0, rtmstartdata, 4) - e.handle_next() + while len(e.queue): + e.handle_next() #e.sc is just shortcuts to these items e.sc = {} e.sc["team_id"] = e.teams.keys()[0] diff --git a/_pytest/test_everything.py b/_pytest/test_everything.py index a121541..c85fc15 100644 --- a/_pytest/test_everything.py +++ b/_pytest/test_everything.py @@ -4,7 +4,7 @@ import json #from wee_slack import render from wee_slack import ProcessNotImplemented -def test_process_message(monkeypatch, realish_eventrouter, mock_websocket): +def test_everything(realish_eventrouter, mock_websocket): eventrouter = realish_eventrouter 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] diff --git a/_pytest/test_presencechange.py b/_pytest/test_presencechange.py index b4202fa..4e02640 100644 --- a/_pytest/test_presencechange.py +++ b/_pytest/test_presencechange.py @@ -1,5 +1,5 @@ -def test_PresenceChange(monkeypatch, realish_eventrouter, mock_websocket): +def test_PresenceChange(realish_eventrouter, mock_websocket): e = realish_eventrouter diff --git a/_pytest/test_process_message.py b/_pytest/test_process_message.py index e2447f7..2e0b31e 100644 --- a/_pytest/test_process_message.py +++ b/_pytest/test_process_message.py @@ -2,7 +2,7 @@ import json from wee_slack import render -def test_process_message(monkeypatch, realish_eventrouter, mock_websocket): +def test_process_message(realish_eventrouter, mock_websocket): e = realish_eventrouter diff --git a/_pytest/test_processreply.py b/_pytest/test_processreply.py index a725f23..041a1db 100644 --- a/_pytest/test_processreply.py +++ b/_pytest/test_processreply.py @@ -1,6 +1,6 @@ #from wee_slack import process_reply -def test_process_reply(monkeypatch, realish_eventrouter, mock_websocket): +def test_process_reply(realish_eventrouter, mock_websocket): e = realish_eventrouter diff --git a/_pytest/test_processteamjoin.py b/_pytest/test_processteamjoin.py index 00a8b4c..c7c199f 100644 --- a/_pytest/test_processteamjoin.py +++ b/_pytest/test_processteamjoin.py @@ -3,7 +3,7 @@ import json from wee_slack import ProcessNotImplemented -def test_process_reply(monkeypatch, mock_websocket, realish_eventrouter): +def test_process_team_join(mock_websocket, realish_eventrouter): eventrouter = realish_eventrouter diff --git a/_pytest/test_sendmessage.py b/_pytest/test_sendmessage.py index a87942d..42c22a6 100644 --- a/_pytest/test_sendmessage.py +++ b/_pytest/test_sendmessage.py @@ -1,5 +1,5 @@ -def test_send_message(monkeypatch, realish_eventrouter, mock_websocket): +def test_send_message(realish_eventrouter, mock_websocket): e = realish_eventrouter t = e.teams.keys()[0] |