@pytest.mark.network
def test_run_method_should_return_success_when_find_packages():
 command = SearchCommand()
 cmdline = '--index=https://pypi.python.org/pypi pip'
 (options, args) = command.parse_args(cmdline.split())
 status = command.run(options, args)
 assert (status == SUCCESS)

@ pytest . mark . network def test_run_method_should_return_success_when_find_packages ( ) : command = SearchCommand ( ) cmdline = '--index=https://pypi.python.org/pypi pip' ( options , args ) = command . parse_args ( cmdline . split ( ) ) status = command . run ( options , args ) assert ( status == SUCCESS )
test searchcommand .