MCPcopy Create free account
hub / github.com/etingof/apacheconfig / testDuplicateOptionsAllowed

Method testDuplicateOptionsAllowed

tests/unit/test_loader.py:258–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

256 self.assertEqual(config, {'a': {'b': ['1', '2']}})
257
258 def testDuplicateOptionsAllowed(self):
259 text = """\
260a = 1
261a = 2
262# comment
263a = 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 = """\

Callers

nothing calls this directly

Calls 4

loadsMethod · 0.95
make_lexerFunction · 0.90
make_parserFunction · 0.90
ApacheConfigLoaderClass · 0.90

Tested by

no test coverage detected