示例#1
0
    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()
示例#2
0
    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()
示例#3
0
 def test_fails_bad_setting(self, setting):
     with pytest.raises(exceptions.InvalidConfigurationException):
         validate_and_parse_option("json:{}".format(setting))