示例#1
0
    def test_tag_as_str_available(self):

        test_tag = Tag('TestTag: ')

        register(test_tag)

        self.assertTrue(tag.available('TestTag:'))
示例#2
0
    def test_register_tag(self):
        test_tag = Tag('TestTag: ')

        register(test_tag)

        from pymodconf.tag import _TAGS
        self.assertTrue(test_tag in _TAGS)
示例#3
0
    def test_load_module_config_file(self):
        # register the test tag
        t = Tag('Module: ')
        register(t)

        # load the configuration
        config = load(DEFAULT_TEST_FILE)

        # check if tag is available
        self.assertIn(str(t), config)
        self.assertEqual(1, len(config[str(t)]))
示例#4
0
 def setUp(self):
     self.testtag = Tag('Module:')
     register(self.testtag)