#NEWLINE# def test_get_url_success( self ) : #NEWLINE# #INDENT# '\n        Test if get_url succeeds.\n        ' #NEWLINE# path = 'salt://saltines' #NEWLINE# dest = '/srv/salt/cheese' #NEWLINE# saltenv = 'base' #NEWLINE# ret = ( mock_file_client , dest , False , saltenv ) #NEWLINE# class MockFileClient ( object ) : #NEWLINE# #INDENT# def get_url( self , * args ) : #NEWLINE# #INDENT# return args #NEWLINE# #UNINDENT# #UNINDENT# mock_file_client = MockFileClient ( ) #NEWLINE# with patch . dict ( cp . __context__ , { #NEWLINE# #INDENT# 'cp.fileclient' : mock_file_client , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# self . assertEqual ( cp . get_url ( path , dest ) , ret )