def read_conf(self): return config.get_conf_from_json_file(self.config_path)
def _load_mode_config(): return config.get_conf_from_json_file(MODE_CONF_PATH)
def _get_conf_from_file(self): return config.get_conf_from_json_file(self.config_path)
def test_file_is_empty_json(self): emptyconf = {} conf = config.get_conf_from_json_file(DIR + '/resources/empty.txt') self.assertEqual(conf, emptyconf)
def load_conf(path): return config.get_conf_from_json_file(path)
def test_file_is_empty_json(self): emptyconf = {} conf = config.get_conf_from_json_file(DIR + '/files/empty.txt') self.assertEqual(conf, emptyconf)
def _get_conf_from_file(): return config.get_conf_from_json_file(constants.CONFIG_PATH)
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)
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)
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)
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)