Example #1
0
 def read_conf(self):
     return config.get_conf_from_json_file(self.config_path)
Example #2
0
def _load_mode_config():
    return config.get_conf_from_json_file(MODE_CONF_PATH)
Example #3
0
 def _get_conf_from_file(self):
     return config.get_conf_from_json_file(self.config_path)
Example #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)
Example #5
0
def load_conf(path):
    return config.get_conf_from_json_file(path)
Example #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)
Example #7
0
def _load_mode_config():
    return config.get_conf_from_json_file(MODE_CONF_PATH)
Example #8
0
def load_conf(path):
    return config.get_conf_from_json_file(path)
Example #9
0
def _get_conf_from_file():
    return config.get_conf_from_json_file(constants.CONFIG_PATH)
Example #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)
Example #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)
Example #12
0
def _get_conf_from_file():
    return config.get_conf_from_json_file(constants.CONFIG_PATH)
Example #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)
Example #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)