#NEWLINE# @ mock . patch ( 'eventlet.GreenPool.spawn_n' ) #NEWLINE# def test_process_services_full_sync_different_devices( self , mock_spawn ) : #NEWLINE# #INDENT# ( router1 , port ) = prepare_router_data ( ) #NEWLINE# ( router2 , port ) = prepare_router_data ( ) #NEWLINE# self . plugin_api . get_routers = mock . Mock ( return_value = [ router1 , router2 ] ) #NEWLINE# self . routing_helper . process_service ( ) #NEWLINE# self . assertEqual ( 2 , mock_spawn . call_count ) #NEWLINE# call1 = mock . call ( self . routing_helper . _process_routers , [ router1 ] , [ ] , router1 [ 'hosting_device' ] [ 'id' ] , all_routers = True ) #NEWLINE# call2 = mock . call ( self . routing_helper . _process_routers , [ call2 ] , [ ] , router2 [ 'hosting_device' ] [ 'id' ] , all_routers = True ) #NEWLINE# mock_spawn . assert_has_calls ( [ call1 , call2 ] , any_order = True )