#NEWLINE# def test_handle_result( container_factory , rabbit_manager , rabbit_config ) : #NEWLINE# #INDENT# ' Verify that `handle_result` can modify the return values of the worker,\n    such that other dependencies see the updated values.\n    ' #NEWLINE# container = container_factory ( ExampleService , rabbit_config ) #NEWLINE# container . start ( ) #NEWLINE# with ServiceRpcProxy ( 'exampleservice' , rabbit_config ) as proxy : #NEWLINE# #INDENT# assert ( proxy . echo ( 'hello' ) == 'hello' ) #NEWLINE# with pytest . raises ( RemoteError ) as exc : #NEWLINE# #INDENT# proxy . unserializable ( ) #NEWLINE# #UNINDENT# assert ( 'is not JSON serializable' in str ( exc . value ) ) #NEWLINE# #UNINDENT# wait_for_worker_idle ( rabbit_config ) #NEWLINE# assert ( worker_result_called == [ ( 'hello' , None ) , ( 'something went wrong' , ( TypeError , ANY , ANY ) ) ] )