#NEWLINE# def test_update_port_status_port_bingding_deleted_concurrently( self ) : #NEWLINE# #INDENT# router1 = self . _create_router ( ) #NEWLINE# states = { #NEWLINE# #INDENT# router1 [ 'id' ] : 'active' , #NEWLINE# #UNINDENT# } #NEWLINE# with mock . patch . object ( self . plugin , 'get_ha_router_port_bindings' ) : #NEWLINE# #INDENT# self . admin_ctx . session . query ( l3_hamode_db . L3HARouterAgentPortBinding ) . filter_by ( router_id = router1 [ 'id' ] ) . delete ( ) #NEWLINE# self . plugin . update_routers_states ( states . admin_ctx , states , self . agent1 [ 'host' ] )