def test_create(self): config = Config.from_dict({'checkers': { 'WhiteSpaceChecker': '' }}) checkers = create_checkers(config)
def test_default(self): config = Config.from_dict({"foo": "bar"}) self.assertEqual("bar", config["foo"])
def test_attribute_with_dash(self): config = Config.from_dict({"foo-bar": "quux"}) self.assertEqual("quux", config.foo_bar)
def test_default_chaining(self): config = Config.from_dict({"foo": "bar"}).add_from_dict({"baz": "quux"}) self.assertEqual("quux", config["baz"])
def test_attribute_access(self): config = Config.from_dict({"foo": "bar"}) self.assertEqual("bar", config.foo)