def test_change_ident(self): new_name = "Bongo" new_version = "1.91" shiji.change_server_ident(new_name, new_version) self.assertEqual(shiji.server_ident["server_name"], new_name) self.assertEqual(shiji.server_ident["server_version"], new_version) self.assertEqual(server.version, "Bongo/1.91")
config[api_name]) # Setup the API routes...list of tuples api_hash = dict(cfg_central.items("apis")) routes = [] for api in api_hash.keys(): api_module = __import__(api, globals(), locals(), [], -1) routes.append((api_hash[api], api_module)) root = urldispatch.APIRouter(routes, config=config, cross_origin_domains=cross_origin_domains, inhibit_http_caching=inhibit_http_caching) shiji.change_server_ident(server_ident) # Setup logging try: fn_log = cfg_central.get("logging", "log_file") except NoOptionError: fn_log = "" try: log_prefix = cfg_central.get("logging", "syslog_prefix") except NoOptionError: log_prefix = "Shiji" if fn_log: tw_log.startLogging(open(fn_log, "w")) else:
sys.exit(-1) config[api_name] = api_module.config.validate_config(config[api_name]) # Setup the API routes...list of tuples api_hash = dict(cfg_central.items("apis")) routes =[] for api in api_hash.keys(): api_module = __import__(api,globals(),locals(),[],-1) routes.append((api_hash[api], api_module)) root = urldispatch.APIRouter(routes, config=config, cross_origin_domains=cross_origin_domains, inhibit_http_caching=inhibit_http_caching) shiji.change_server_ident(server_ident) # Setup logging try: fn_log = cfg_central.get("logging", "log_file") except NoOptionError: fn_log = "" try: log_prefix = cfg_central.get("logging", "syslog_prefix") except NoOptionError: log_prefix = "Shiji" if fn_log: tw_log.startLogging(open(fn_log, "w")) else: