@@ -153,8 +153,7 @@ def test_consume_notification_method_not_found(endpoint):
153
153
154
154
155
155
def test_consume_async_notification_error (endpoint , dispatcher ):
156
- def _async_handler (params ):
157
- assert params == {'key' : 'value' }
156
+ def _async_handler ():
158
157
raise ValueError ()
159
158
handler = mock .Mock (return_value = _async_handler )
160
159
dispatcher ['methodName' ] = handler
@@ -189,8 +188,7 @@ def test_consume_request(endpoint, consumer, dispatcher):
189
188
190
189
191
190
def test_consume_async_request (endpoint , consumer , dispatcher ):
192
- def _async_handler (params ):
193
- assert params == {'key' : 'value' }
191
+ def _async_handler ():
194
192
return 1234
195
193
handler = mock .Mock (return_value = _async_handler )
196
194
dispatcher ['methodName' ] = handler
@@ -216,8 +214,7 @@ def _async_handler(params):
216
214
(exceptions .JsonRpcMethodNotFound , exceptions .JsonRpcMethodNotFound ()),
217
215
])
218
216
def test_consume_async_request_error (exc_type , error , endpoint , consumer , dispatcher ):
219
- def _async_handler (params ):
220
- assert params == {'key' : 'value' }
217
+ def _async_handler ():
221
218
raise exc_type ()
222
219
handler = mock .Mock (return_value = _async_handler )
223
220
dispatcher ['methodName' ] = handler
@@ -264,8 +261,7 @@ def test_consume_request_error(exc_type, error, endpoint, consumer, dispatcher):
264
261
265
262
266
263
def test_consume_request_cancel (endpoint , dispatcher ):
267
- def async_handler (params ):
268
- assert params == {'key' : 'value' }
264
+ def async_handler ():
269
265
time .sleep (3 )
270
266
handler = mock .Mock (return_value = async_handler )
271
267
dispatcher ['methodName' ] = handler
0 commit comments