(self)
| 210 | assert app.bar.tb == ("AB",) |
| 211 | |
| 212 | def test_config_dict_args(self): |
| 213 | app = MyApp() |
| 214 | app.parse_command_line( |
| 215 | "--Foo.fdict a=1 --Foo.fdict b=b --Foo.fdict c=3 " |
| 216 | "--Bar.bdict k=1 -D=a=b -D 22=33 " |
| 217 | "--Bar.idict k=1 --Bar.idict b=2 --Bar.idict c=3 ".split() |
| 218 | ) |
| 219 | fdict = {"a": "1", "b": "b", "c": "3"} |
| 220 | bdict = {"k": "1", "a": "b", "22": "33"} |
| 221 | idict = {"k": 1, "b": 2, "c": 3} |
| 222 | config = app.config |
| 223 | assert config.Bar.idict == idict |
| 224 | self.assertDictEqual(config.Foo.fdict, fdict) |
| 225 | self.assertDictEqual(config.Bar.bdict, bdict) |
| 226 | app.init_foo() |
| 227 | self.assertEqual(app.foo.fdict, fdict) |
| 228 | app.init_bar() |
| 229 | assert app.bar.idict == idict |
| 230 | self.assertEqual(app.bar.bdict, bdict) |
| 231 | |
| 232 | def test_config_propagation(self): |
| 233 | app = MyApp() |
nothing calls this directly
no test coverage detected