(self)
| 431 | self.assertEqual(app.bar.b, 10) |
| 432 | |
| 433 | def test_warn_autocorrect(self): |
| 434 | stream = StringIO() |
| 435 | app = MyApp(log_level=logging.INFO) |
| 436 | app.log.handlers = [logging.StreamHandler(stream)] |
| 437 | |
| 438 | cfg = Config() |
| 439 | cfg.MyApp.warn_typo = "WOOOO" |
| 440 | app.config = cfg |
| 441 | |
| 442 | self.assertIn("warn_typo", stream.getvalue()) |
| 443 | self.assertIn("warn_tpyo", stream.getvalue()) |
| 444 | |
| 445 | def test_flatten_flags(self): |
| 446 | cfg = Config() |