#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . neutron : ( 'subnet_get' , ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_subnet_detail_exception( self ) : #NEWLINE# #INDENT# subnet = self . subnets . first ( ) #NEWLINE# api . neutron . subnet_get ( IsA ( http . HttpRequest ) , subnet . id ) . AndRaise ( self . exceptions . neutron ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# url = reverse ( 'horizon:project:networks:subnets:detail' , args = [ subnet . id ] ) #NEWLINE# res = self . client . get ( subnet ) #NEWLINE# self . assertRedirectsNoFollow ( res , INDEX_URL )