def test_mimetypes_flag():
    """ tests get_namespaces using -m flag """
    path_dirs = test_env.PathDirs()
    parser = get_namespaces.set_parser()
    get_namespaces.parse_args(parser.parse_args(['-m']), parser)
    get_namespaces.parse_args(
        parser.parse_args(['-m', '-t', path_dirs.template_dir]), parser)
Beispiel #2
0
def test_invalid_flag():
    """ tests get_namespaces using invalid flag """
    parser = get_namespaces.set_parser()
    with pytest.raises(SystemExit):
        get_namespaces.parse_args(parser.parse_args(['-z']), parser)
Beispiel #3
0
def test_help_flag():
    """ tests get_namespaces using -h flag """
    parser = get_namespaces.set_parser()
    with pytest.raises(SystemExit):
        get_namespaces.parse_args(parser.parse_args(['-h']), parser)
Beispiel #4
0
def test_template_dir_flag():
    """ tests get_namespaces using -t flag """
    parser = get_namespaces.set_parser()
    with pytest.raises(SystemExit):
        get_namespaces.parse_args(parser.parse_args(['-t']), parser)
Beispiel #5
0
def test_mimetypes_flag():
    """ tests get_namespaces using -m flag """
    path_dirs = test_env.PathDirs()
    parser = get_namespaces.set_parser()
    get_namespaces.parse_args(parser.parse_args(['-m']), parser)
    get_namespaces.parse_args(parser.parse_args(['-m', '-t', path_dirs.template_dir]), parser)
Beispiel #6
0
def test_no_args():
    """ tests get_namespaces with no arguments """
    parser = get_namespaces.set_parser()
    get_namespaces.parse_args(parser.parse_args([]), parser)
def test_invalid_flag():
    """ tests get_namespaces using invalid flag """
    parser = get_namespaces.set_parser()
    with pytest.raises(SystemExit):
        get_namespaces.parse_args(parser.parse_args(['-z']), parser)
def test_help_flag():
    """ tests get_namespaces using -h flag """
    parser = get_namespaces.set_parser()
    with pytest.raises(SystemExit):
        get_namespaces.parse_args(parser.parse_args(['-h']), parser)
def test_template_dir_flag():
    """ tests get_namespaces using -t flag """
    parser = get_namespaces.set_parser()
    with pytest.raises(SystemExit):
        get_namespaces.parse_args(parser.parse_args(['-t']), parser)
Beispiel #10
0
def test_no_args():
    """ tests get_namespaces with no arguments """
    parser = get_namespaces.set_parser()
    get_namespaces.parse_args(parser.parse_args([]), parser)