diff options
Diffstat (limited to '_pytest/test_eventrouter.py')
-rw-r--r-- | _pytest/test_eventrouter.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/_pytest/test_eventrouter.py b/_pytest/test_eventrouter.py index 85a456e..036aa71 100644 --- a/_pytest/test_eventrouter.py +++ b/_pytest/test_eventrouter.py @@ -2,16 +2,16 @@ import pytest from wee_slack import EventRouter, SlackRequest def test_EventRouter(mock_weechat): - # Sending valid json adds to the queue. + # Sending valid object adds to the queue. e = EventRouter() - e.receive_json('{}') + e.receive({}) assert len(e.queue) == 1 # Handling an event removes from the queue. e = EventRouter() # Create a function to test we are called e.proc['testfunc'] = lambda x, y: x - e.receive_json('{"type": "testfunc"}') + e.receive({"type": "testfunc"}) e.handle_next() assert len(e.queue) == 0 @@ -19,7 +19,7 @@ def test_EventRouter(mock_weechat): e = EventRouter() # Create a function to test we are called e.proc['local_testfunc'] = lambda x, y: x - e.receive_json('{"type": "local_testfunc"}') + e.receive({"type": "local_testfunc"}) e.handle_next() assert len(e.queue) == 0 @@ -27,5 +27,5 @@ def test_EventRouter(mock_weechat): # shouldn't raise an exception. e = EventRouter() # Create a function to test we are called - e.receive_json('{"type": "testfunc"}') + e.receive({"type": "testfunc"}) e.handle_next() |