#NEWLINE# @ mock . patch . object ( action_validator , 'validate_action' , mock . MagicMock ( return_value = True ) ) #NEWLINE# @ mock . patch . object ( RunnerContainerService , 'get_entry_point_abs_path' , mock . MagicMock ( return_value = '/path/to/file' ) ) #NEWLINE# @ mock . patch ( '__builtin__.open' , mock . mock_open ( read_data = 'file content' ) , create = True ) #NEWLINE# def test_get_one_ref( self ) : #NEWLINE# #INDENT# post_resp = self . app . post_json ( '/v1/actions' , ACTION_1 ) #NEWLINE# action_id = get_resp . json [ 'id' ] #NEWLINE# action_ref = '.' . join ( ( post_resp . json [ 'pack' ] , post_resp . json [ 'name' ] ) ) #NEWLINE# try : #NEWLINE# #INDENT# get_resp = self . app . get ( ( '/v1/actions/views/entry_point/%s' % action_ref ) ) #NEWLINE# self . assertEqual ( get_resp . status_int , 200 ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . app . delete ( ( '/v1/actions/%s' % action_id ) )