def test_update_config(self): settings = cli.load_factory_settings() key = "postgres.dsn" value = "postgres://blah" cli.update_config(settings, key, value) self.assertEqual(settings["postgres"]["dsn"], value) key = "tz" value = "shanghai" cli.update_config(settings, key, value) self.assertEqual(settings[key], value)
def test_load_factory_settings(self): settings = cli.load_factory_settings() self.assertTrue(len(settings) > 0) self.assertEqual("Asia/Shanghai", settings.get("tz"))