(self)
| 256 | self.assertEqual(config, {'a': {'b': ['1', '2']}}) |
| 257 | |
| 258 | def testDuplicateOptionsAllowed(self): |
| 259 | text = """\ |
| 260 | a = 1 |
| 261 | a = 2 |
| 262 | # comment |
| 263 | a = 3 |
| 264 | """ |
| 265 | options = { |
| 266 | 'allowmultioptions': True |
| 267 | } |
| 268 | |
| 269 | ApacheConfigLexer = make_lexer() |
| 270 | ApacheConfigParser = make_parser() |
| 271 | |
| 272 | loader = ApacheConfigLoader( |
| 273 | ApacheConfigParser(ApacheConfigLexer()), **options) |
| 274 | |
| 275 | config = loader.loads(text) |
| 276 | |
| 277 | self.assertEqual(config, {'a': ['1', '2', '3']}) |
| 278 | |
| 279 | def testDuplicateOptionsDenied(self): |
| 280 | text = """\ |
nothing calls this directly
no test coverage detected