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

Method testKeyOnlyOption

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

Source from the content-addressed store, hash-verified

295 self.assertRaises(ApacheConfigError, loader.loads, text)
296
297 def testKeyOnlyOption(self):
298 text = """\
299key2
300key value
301"""
302 ApacheConfigLexer = make_lexer()
303 ApacheConfigParser = make_parser()
304
305 loader = ApacheConfigLoader(
306 ApacheConfigParser(ApacheConfigLexer()))
307
308 config = loader.loads(text)
309 self.assertEqual(config, {'key2': None, 'key': 'value'})
310
311 def testDuplicateOptionsOverriden(self):
312 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