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
def tests_just_all_devs(): config = library._parse_config('tests/files/just_all_devs.conf') assert config assert_config(config, just_all_devs_conf)
def tests_just_reassign(): config = library._parse_config('tests/files/just_reassign.conf') assert config assert_config(config, just_reassign_conf)
def tests_just_detect(): config = library._parse_config('tests/files/just_detect.conf') assert config assert_config(config, just_detect_conf)
def tests_just_checker(): config = library._parse_config('tests/files/just_checker.conf') assert config assert_config(config, just_checker_conf)
def tests_ugly2(): config = library._parse_config('tests/files/ugly2.conf') assert config assert_config(config, ugly2_conf)
def test_already_updated(): config = library._parse_config('tests/files/already_updated.conf') assert config assert_config(config, already_updated_conf)
def test_all_the_things(): config = library._parse_config('tests/files/all_the_things.conf') assert config assert_config(config, all_the_things_conf)
def test_already_rhel8(): config = library._parse_config('tests/files/default_rhel8.conf') assert config assert_config(config, default_rhel8_conf)