def test_inexistent_params(self): config = Config() with self.assertRaises(AttributeError): config["souveniers"] with self.assertRaises(AttributeError): config.souveniers with self.assertRaises(AttributeError): config.get("souveniers")
def test_set(self): config = Config() config.set("app_name", "test2") self.assertEqual(config.get("app_name"), "test2") self.assertEqual(config.app_name, "test2") self.assertEqual(config["app_name"], "test2")
def test_get(self): config = Config() self.assertEqual(config.get("app_name"), "test")