コード例 #1
0
 def test_load_duplicate(self):
     config_loader = ConfigLoader()
     config_loader.update(dict(instrumentation=['test']))
     config_loader.update(dict(instrumentation=['test']))
     assert_equal(config_loader.instrumentation, ['test'])
コード例 #2
0
 def test_load_bad(self):
     config_loader = ConfigLoader()
     config_loader.update(self.filepath)
コード例 #3
0
 def test_load(self):
     test_cfg_file = os.path.join(DATA_DIR, 'test-config.py')
     config = ConfigLoader()
     config.update(test_cfg_file)
     assert_equal(config.device, 'TEST')
コード例 #4
0
 def test_load_duplicate(self):
     config_loader = ConfigLoader()
     config_loader.update(dict(instrumentation=['test']))
     config_loader.update(dict(instrumentation=['test']))
     assert_equal(config_loader.instrumentation, ['test'])
コード例 #5
0
 def test_load_bad(self):
     config_loader = ConfigLoader()
     config_loader.update(self.filepath)
コード例 #6
0
 def test_load(self):
     test_cfg_file = os.path.join(DATA_DIR, 'test-config.py')
     config = ConfigLoader()
     config.update(test_cfg_file)
     assert_equal(config.device, 'TEST')