Mercurial > hgrepos > Python > libs > ConfigMix
comparison tests/test.py @ 486:5a88c514d4e0
More unittests for interpolation
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Fri, 17 Dec 2021 15:56:53 +0100 |
| parents | 9fcdc42a0457 |
| children | a9a291927a4b |
comparison
equal
deleted
inserted
replaced
| 485:008b35666a43 | 486:5a88c514d4e0 |
|---|---|
| 222 | 222 |
| 223 url = cfg.getvar_s("db.engines.ro.url") | 223 url = cfg.getvar_s("db.engines.ro.url") |
| 224 self.assertEqual( | 224 self.assertEqual( |
| 225 u("postgresql+psycopg2://the_database_user_2:the-database-password-2@3rd-host:5432/my_database_catalog"), | 225 u("postgresql+psycopg2://the_database_user_2:the-database-password-2@3rd-host:5432/my_database_catalog"), |
| 226 url) | 226 url) |
| 227 | |
| 228 def test02b_load_with_ini(self): | |
| 229 cfg = self._load( | |
| 230 os.path.join(TESTDATADIR, "conf20.yml"), | |
| 231 os.path.join(TESTDATADIR, "conf21.yml"), | |
| 232 os.path.join(TESTDATADIR, "conf22.ini")) | |
| 233 self.assertEqual(u("3rd-host3rd-host"), | |
| 234 cfg.getvar_s("db.locinfo.ro.hostname2")) | |
| 227 | 235 |
| 228 def test02_load_with_json(self): | 236 def test02_load_with_json(self): |
| 229 cfg = self._load( | 237 cfg = self._load( |
| 230 os.path.join(TESTDATADIR, "conf20.yml"), | 238 os.path.join(TESTDATADIR, "conf20.yml"), |
| 231 os.path.join(TESTDATADIR, "conf21.yml"), | 239 os.path.join(TESTDATADIR, "conf21.yml"), |
