コード例 #1
0
    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)
コード例 #2
0
 def test_load_factory_settings(self):
     settings = cli.load_factory_settings()
     self.assertTrue(len(settings) > 0)
     self.assertEqual("Asia/Shanghai", settings.get("tz"))