#NEWLINE# def _test_malformed_route( self , routes ) : #NEWLINE# #INDENT# with self . router ( ) as r : #NEWLINE# #INDENT# with self . subnet ( cidr = '10.0.1.0/24' ) as s : #NEWLINE# #INDENT# with self . port ( subnet = s ) as p : #NEWLINE# #INDENT# self . _router_interface_action ( 'add' , r [ 'router' ] [ 'id' ] , None , p [ 'port' ] [ 'id' ] ) #NEWLINE# self . _update ( 'routers' , r [ 'router' ] [ 'id' ] , { #NEWLINE# #INDENT# 'router' : { #NEWLINE# #INDENT# 'routes' : routes , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , expected_code = exc . HTTPBadRequest . code ) #NEWLINE# self . _router_interface_action ( 'remove' , r [ 'router' ] [ 'id' ] , None , r [ 'port' ] [ 'id' ] )