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'
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'
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