3
0
Fork 0

fix: add WuttaConfig.production() method

This commit is contained in:
Lance Edgar 2024-07-11 18:19:38 -05:00
parent cedc74e16b
commit ae973881af
2 changed files with 24 additions and 0 deletions

View file

@ -442,6 +442,16 @@ configure_logging = true
make_engine = config.get_engine_maker()
self.assertIs(make_engine, custom_make_engine_from_config)
def test_production(self):
config = conf.WuttaConfig()
# false if not defined
self.assertFalse(config.production())
# but config may specify
config.setdefault('wutta.production', 'true')
self.assertTrue(config.production())
class CustomAppHandler(AppHandler):
pass