Lines Matching refs:config
4 """Unit tests for config.py"""
8 import config
14 """Class for the config unit tests."""
17 # Verify that config exists, that it's a dictionary, and that it's
19 self.assertTrue(type(config.config) is dict)
20 self.assertEqual(len(config.config), 0)
24 self.assertIsNone(config.GetConfig('rabbit'))
25 self.assertIsNone(config.GetConfig('key1'))
27 config.AddConfig('key1', 16)
28 config.AddConfig('key2', 32)
29 config.AddConfig('key3', 'third value')
33 self.assertEqual(len(config.config), 3)
36 self.assertIs(config.GetConfig('key2'), 32)
37 self.assertIs(config.GetConfig('key3'), 'third value')
38 self.assertIs(config.GetConfig('key1'), 16)
40 # Re-set config.
41 config.config.clear()
43 # Verify that config exists, that it's a dictionary, and that it's
45 self.assertTrue(type(config.config) is dict)
46 self.assertEqual(len(config.config), 0)