#NEWLINE# @ mock . patch ( 'pypi_cli.click.launch' ) #NEWLINE# def test_with_package( self , mock_launch , runner ) : #NEWLINE# #INDENT# result = runner . invoke ( pypi . cli , [ 'browse' , 'webargs' ] ) #NEWLINE# assert ( result . exit_code == 0 ) #NEWLINE# assert ( mock_launch . called is True ) #NEWLINE# mock_launch . assert_called_with ( 'http://pypi.python.org/pypi/webargs' )