Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keotl committed Jun 17, 2020
1 parent 0262953 commit b23e2b4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jivago/event/dispatch/message_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ def __init__(self, message_name: str):
def can_handle(self, message_name: str) -> bool:
return self.message_name == message_name

async def handle(self, payload: object):
def handle(self, payload: object):
raise NotImplementedError
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alabaster==0.7.11
anachronos==0.0.4
anachronos==0.0.5
argh==0.26.2
Babel==2.6.0
certifi==2018.8.24
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
exclude=['contrib', 'docs', 'test', 'test.*' 'tests', 'tests.*', 'example_app', 'example_app.*', 'test_data',
'test_data.*', 'test_utils', 'test_utils.*', 'e2e_test', 'e2e_test.*']),

install_requires=['Jinja2', 'MarkupSafe', 'croniter', 'pyyaml', 'werkzeug'],
install_requires=['Jinja2', 'croniter', 'pyyaml', 'werkzeug'],
)
6 changes: 3 additions & 3 deletions test/event/test_synchronous_event_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MESSAGE_NAME = "message_name"

PAYLOAD = object()

RESPONSE = object()

class SynchronousEventBusTest(unittest.TestCase):

Expand All @@ -22,9 +22,9 @@ def test_whenEmittingEvent_thenInvokeMatchingMessageDispatcher(self):
self.message_dispatcher.handle.assert_called_with(PAYLOAD)

def test_whenEmittingEvent_thenReturnCollectionOfResponses(self):
self.message_dispatcher.handle.return_value = PAYLOAD
self.message_dispatcher.handle.return_value = RESPONSE

responses = self.message_bus.emit(MESSAGE_NAME, PAYLOAD)

self.assertEqual(1, len(responses))
self.assertEqual(PAYLOAD, responses[0])
self.assertEqual(RESPONSE, responses[0])

0 comments on commit b23e2b4

Please sign in to comment.