#NEWLINE# @ mock . patch ( 'nova.network.api.API.get' ) #NEWLINE# def test_network_show_not_found( self , get_mock ) : #NEWLINE# #INDENT# ctxt = self . req . environ [ 'nova.context' ] #NEWLINE# get_mock . side_effect = exception . NetworkNotFound ( network_id = 1 ) #NEWLINE# self . assertRaises ( webob . exc . HTTPNotFound , self . controller . show , self . req , 1 ) #NEWLINE# get_mock . assert_called_once_with ( get_mock , 1 )