3
0
Fork 0

Allow factory override in make_config()

also add `winsvc` param for `get_config_paths()` to support
RattailFileMonitor service on windows
This commit is contained in:
Lance Edgar 2023-11-21 22:25:45 -06:00
parent ed6a5db452
commit 1431555605
2 changed files with 89 additions and 12 deletions

View file

@ -417,6 +417,18 @@ class TestGenericDefaultFiles(TestCase):
self.assertEqual(len(files), 0)
class TestGetConfigPaths(FileConfigTestCase):
def test_winsvc(self):
myconf = self.write_file('my.conf', """
[wutta.config]
winsvc.RattailFileMonitor = /path/to/other/file
""")
files = conf.get_config_paths(files=[myconf], winsvc='RattailFileMonitor')
self.assertEqual(files, ['/path/to/other/file'])
class TestMakeConfig(FileConfigTestCase):
# nb. we use appname='wuttatest' in this suite to avoid any