def test_files_no_use_wheel(self): argv = [ 'files', 'requests==1.0.1', 'mock', '-i', 'internal', '--no-use-wheel', ] with pytest.raises(SystemExit): commands.parse_args(argv)
def test_files_no_use_wheel(self): argv = [ 'files', 'requests==1.0.1', 'mock', '-i', 'internal', '--no-use-wheel', ] with pytest.raises(SystemExit): commands.parse_args(argv)
def test_requirements_download_dir_shortcut(self): argv = [ 'requirements', 'requirements.txt', '-i', 'internal', '-d', '~/.packages' ] options = commands.parse_args(argv) assert options.download_dir == '~/.packages' assert options.command == 'requirements' assert options.requirements_file == 'requirements.txt'
def test_requirements_no_use_wheel(self): argv = [ 'requirements', 'requirements.txt', '-i', 'internal', '--no-use-wheel', ] options = commands.parse_args(argv) assert options.no_use_wheel assert options.command == 'requirements'
def test_packages_download_dir(self): argv = [ 'packages', 'mock', '-i', 'internal', '--download-dir', '~/.packages' ] options = commands.parse_args(argv) assert options.download_dir == '~/.packages' assert options.command == 'packages' assert options.packages == ['mock']
def test_requirements_download_dir(self): argv = [ 'requirements', 'requirements.txt', '-i', 'internal', '--download-dir', '~/.packages' ] options = commands.parse_args(argv) assert options.download_dir == '~/.packages' assert options.command == 'requirements' assert options.requirements_file == 'requirements.txt'
def test_packages_download_dir(self): argv = [ 'packages', 'mock', '-i', 'internal', '--download-dir', '~/.packages' ] options = commands.parse_args(argv) assert options.download_dir == '~/.packages' assert options.command == 'packages' assert options.packages == ['mock']
def test_requirements_no_use_wheel(self): argv = [ 'requirements', 'requirements.txt', '-i', 'internal', '--no-use-wheel', ] options = commands.parse_args(argv) assert options.no_use_wheel assert options.command == 'requirements'
def test_username_shortcut(self): argv = ['files', 'mock', '-i', 'internal', '-u', 'foo'] options = commands.parse_args(argv) assert options.username == 'foo' assert options.command == 'files' assert options.files == ['mock']
def test_password_shortcut(self): argv = ['files', 'mock', '-i', 'internal', '-p', 'bar'] options = commands.parse_args(argv) assert options.password == 'bar' assert options.command == 'files' assert options.files == ['mock']
def test_packages(self): argv = ['packages', 'requests==1.0.1', 'mock', '-i', 'internal'] options = commands.parse_args(argv) assert options.command == 'packages' assert options.packages == ['requests==1.0.1', 'mock'] assert not options.no_use_wheel
def test_index_url_shortcut(self): argv = ['files', 'mock', '-i', 'internal'] options = commands.parse_args(argv) assert options.index == 'internal'
def test_files(self): argv = ['files', 'requests==1.0.1', 'mock', '-i', 'internal'] options = commands.parse_args(argv) assert options.command == 'files' assert options.files == ['requests==1.0.1', 'mock']
def test_no_arguments(self): argv = [] with pytest.raises(SystemExit): commands.parse_args(argv)
def test_no_index_url(self): argv = ['files', 'mock'] with pytest.raises(SystemExit): commands.parse_args(argv)
def test_index_url_shortcut(self): argv = ['files', 'mock', '-i', 'internal'] options = commands.parse_args(argv) assert options.index == 'internal'
def test_password_shortcut(self): argv = ['files', 'mock', '-i', 'internal', '-p', 'bar'] options = commands.parse_args(argv) assert options.password == 'bar' assert options.command == 'files' assert options.files == ['mock']
def test_username_shortcut(self): argv = ['files', 'mock', '-i', 'internal', '-u', 'foo'] options = commands.parse_args(argv) assert options.username == 'foo' assert options.command == 'files' assert options.files == ['mock']
def test_packages_no_use_wheel(self): argv = ['packages', 'mock', '-i', 'internal', '--no-use-wheel'] options = commands.parse_args(argv) assert options.no_use_wheel assert options.command == 'packages'
def test_files(self): argv = ['files', 'requests==1.0.1', 'mock', '-i', 'internal'] options = commands.parse_args(argv) assert options.command == 'files' assert options.files == ['requests==1.0.1', 'mock']
def test_requirements(self): argv = ['requirements', 'requirements.txt', '-i', 'internal'] options = commands.parse_args(argv) assert options.command == 'requirements' assert options.requirements_file == 'requirements.txt' assert not options.no_use_wheel
def test_packages_no_use_wheel(self): argv = ['packages', 'mock', '-i', 'internal', '--no-use-wheel'] options = commands.parse_args(argv) assert options.no_use_wheel assert options.command == 'packages'
def test_no_arguments(self): argv = [] with pytest.raises(SystemExit): commands.parse_args(argv)
def test_packages(self): argv = ['packages', 'requests==1.0.1', 'mock', '-i', 'internal'] options = commands.parse_args(argv) assert options.command == 'packages' assert options.packages == ['requests==1.0.1', 'mock'] assert not options.no_use_wheel
def test_requirements(self): argv = ['requirements', 'requirements.txt', '-i', 'internal'] options = commands.parse_args(argv) assert options.command == 'requirements' assert options.requirements_file == 'requirements.txt' assert not options.no_use_wheel
def test_no_index_url(self): argv = ['files', 'mock'] with pytest.raises(SystemExit): commands.parse_args(argv)