def test_unset_defaults(self, section): match = validate_and_parse_option(section) if section == "json": assert match.is_on() else: assert not match.is_on()
def test_parse_option(self, section, setting): option = "{}:{}".format(section, setting) match = validate_and_parse_option(option) assert match.section == section if setting == "on": assert match.is_on() else: assert not match.is_on()
def test_fails_bad_setting(self, setting): with pytest.raises(exceptions.InvalidConfigurationException): validate_and_parse_option("json:{}".format(setting))