Пример #1
0
def test_parse_args():
    mock_argv = ['clean_nerve']
    with mock.patch('sys.argv', mock_argv):
        args = clean_nerve.parse_args()

    assert not args.simulate
    assert args.cluster_type == 'infrastructure'
Пример #2
0
def test_parse_args_cluster_type():
    mock_argv = ['clean_nerve', '--cluster-type', 'bar']
    with mock.patch('sys.argv', mock_argv):
        args = clean_nerve.parse_args()

    assert args.cluster_type == 'bar'
Пример #3
0
def test_parse_args_simulate():
    mock_argv = ['clean_nerve', '--simulate']
    with mock.patch('sys.argv', mock_argv):
        args = clean_nerve.parse_args()

    assert args.simulate