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

Method testDuplicateOptionsDenied

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

Source from the content-addressed store, hash-verified

277 self.assertEqual(config, {'a': ['1', '2', '3']})
278
279 def testDuplicateOptionsDenied(self):
280 text = """\
281a = 1
282<b/>
283a = 2
284"""
285 options = {
286 'allowmultioptions': False
287 }
288
289 ApacheConfigLexer = make_lexer()
290 ApacheConfigParser = make_parser()
291
292 loader = ApacheConfigLoader(
293 ApacheConfigParser(ApacheConfigLexer()), **options)
294
295 self.assertRaises(ApacheConfigError, loader.loads, text)
296
297 def testKeyOnlyOption(self):
298 text = """\

Callers

nothing calls this directly

Calls 3

make_lexerFunction · 0.90
make_parserFunction · 0.90
ApacheConfigLoaderClass · 0.90

Tested by

no test coverage detected