def test_parsing_bad_config_gives_None():
    content = 'foo'
    path = 'my_file'

    parsed = library._parse_config(path, content)

    assert parsed is None
def test_parse_config():
    content = 'anonymous_enable=YES'
    path = 'my_file'

    parsed = library._parse_config(path, content)

    assert parsed['anonymous_enable'] is True
示例#3
0
def tests_just_all_devs():
    config = library._parse_config('tests/files/just_all_devs.conf')
    assert config
    assert_config(config, just_all_devs_conf)
示例#4
0
def tests_just_reassign():
    config = library._parse_config('tests/files/just_reassign.conf')
    assert config
    assert_config(config, just_reassign_conf)
示例#5
0
def tests_just_detect():
    config = library._parse_config('tests/files/just_detect.conf')
    assert config
    assert_config(config, just_detect_conf)
示例#6
0
def tests_just_checker():
    config = library._parse_config('tests/files/just_checker.conf')
    assert config
    assert_config(config, just_checker_conf)
示例#7
0
def tests_ugly2():
    config = library._parse_config('tests/files/ugly2.conf')
    assert config
    assert_config(config, ugly2_conf)
示例#8
0
def test_already_updated():
    config = library._parse_config('tests/files/already_updated.conf')
    assert config
    assert_config(config, already_updated_conf)
示例#9
0
def test_all_the_things():
    config = library._parse_config('tests/files/all_the_things.conf')
    assert config
    assert_config(config, all_the_things_conf)
示例#10
0
def test_already_rhel8():
    config = library._parse_config('tests/files/default_rhel8.conf')
    assert config
    assert_config(config, default_rhel8_conf)