예제 #1
0
 def read_conf(self):
     return config.get_conf_from_json_file(self.config_path)
예제 #2
0
def _load_mode_config():
    return config.get_conf_from_json_file(MODE_CONF_PATH)
예제 #3
0
 def _get_conf_from_file(self):
     return config.get_conf_from_json_file(self.config_path)
예제 #4
0
 def test_file_is_empty_json(self):
     emptyconf = {}
     conf = config.get_conf_from_json_file(DIR + '/resources/empty.txt')
     self.assertEqual(conf, emptyconf)
예제 #5
0
def load_conf(path):
    return config.get_conf_from_json_file(path)
예제 #6
0
 def test_file_is_empty_json(self):
     emptyconf = {}
     conf = config.get_conf_from_json_file(DIR + '/files/empty.txt')
     self.assertEqual(conf, emptyconf)
예제 #7
0
def _load_mode_config():
    return config.get_conf_from_json_file(MODE_CONF_PATH)
예제 #8
0
def load_conf(path):
    return config.get_conf_from_json_file(path)
예제 #9
0
def _get_conf_from_file():
    return config.get_conf_from_json_file(constants.CONFIG_PATH)
예제 #10
0
 def test_valid_conf(self):
     conf = config.get_conf_from_json_file(
         os.path.dirname(__file__) + "/resources/valid_conf.json")
     self.assertEqual(topology.validate(conf), conf)
예제 #11
0
 def test_invalid_property(self):
     conf = config.get_conf_from_json_file(
         os.path.dirname(__file__) + "/resources/invalid_conf.json")
     self.assertRaisesRegexp(ConfigurationError,
                             "Invalid property: invalid property",
                             topology.validate, conf)
예제 #12
0
def _get_conf_from_file():
    return config.get_conf_from_json_file(constants.CONFIG_PATH)
예제 #13
0
 def test_valid_conf(self):
     conf = config.get_conf_from_json_file(os.path.dirname(__file__) +
                                           "/files/valid_conf.json")
     self.assertEqual(topology.validate(conf), conf)
예제 #14
0
 def test_invalid_property(self):
     conf = config.get_conf_from_json_file(os.path.dirname(__file__) +
                                           "/files/invalid_conf.json")
     self.assertRaisesRegexp(ConfigurationError,
                             "Invalid property: invalid property",
                             topology.validate, conf)