def get_backends(self) -> dict: """ Get the configured backends. """ return Config.get_backends()
def base_url(): backends = Config.get_backends() assert 'http' in backends, 'Missing HTTP server configuration' url = 'http://localhost:{port}'.format(port=backends['http']['port']) set_base_url(url) yield url