Example #1
0
 def test_v2raise(self):
     fd, fname = mkstemp('.json')
     f = os.fdopen(fd, 'w')
     f.write(json2file)
     f.close()
     # Unlink the file
     cl = JSONFileConfigLoader(fname, log=log)
     with nt.assert_raises(ValueError):
         cl.load_config()
Example #2
0
 def test_v2raise(self):
     fd, fname = mkstemp('.json')
     f = os.fdopen(fd, 'w')
     f.write(json2file)
     f.close()
     # Unlink the file
     cl = JSONFileConfigLoader(fname, log=log)
     with nt.assert_raises(ValueError):
         cl.load_config()
Example #3
0
 def test_json(self):
     fd, fname = mkstemp('.json')
     f = os.fdopen(fd, 'w')
     f.write(json1file)
     f.close()
     # Unlink the file
     cl = JSONFileConfigLoader(fname, log=log)
     config = cl.load_config()
     self._check_conf(config)
Example #4
0
 def test_json(self):
     fd, fname = mkstemp('.json')
     f = os.fdopen(fd, 'w')
     f.write(json1file)
     f.close()
     # Unlink the file
     cl = JSONFileConfigLoader(fname, log=log)
     config = cl.load_config()
     self._check_conf(config)