#NEWLINE# @ mock . patch ( 'website.addons.base.views.addon_view_file' ) #NEWLINE# def test_no_action_calls_view_file( self , mock_view_file ) : #NEWLINE# #INDENT# self . user . reload ( ) #NEWLINE# self . project . reload ( ) #NEWLINE# file_node = self . get_test_file ( ) #NEWLINE# guid = file_node . get_guid ( create = True ) #NEWLINE# mock_view_file . return_value = self . get_mako_return ( ) #NEWLINE# self . app . get ( '/{}/' . format ( guid . _id ) , auth = self . user . auth ) #NEWLINE# ( args , kwargs ) = mock_view_file . call_args #NEWLINE# assert_equals ( kwargs , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equals ( args [ 0 ] . user . _id , self . user . _id ) #NEWLINE# assert_equals ( args [ 1 ] , self . project ) #NEWLINE# assert_equals ( args [ 2 ] , file_node ) #NEWLINE# assert_true ( isinstance ( args [ 3 ] , file_node . touch ( None ) . __class__ ) )