#NEWLINE# @ patch ( 'requests.get' ) #NEWLINE# def test_download_url( self , mockget ) : #NEWLINE# #INDENT# mockget . return_value = Mock ( ) #NEWLINE# mockget . return_value . content = self . dists [ 'dp' ] . bytes ( ) #NEWLINE# rd = self . makeone ( ) #NEWLINE# ( pinfo , outfile ) = rd . download_url ( Link ( 'http://fakeurl.com/dummypackage.tar.gz#egg=dummypackage' ) ) #NEWLINE# assert outfile . exists ( ) #NEWLINE# assert ( rd . name == 'dummypackage' )