(context, url)
return '{}://{}{}'.format(scheme, resolve_hostname(context, fqdn), path)
return the url with a resolved hostname
    :type context: behave.runner.Context
    :type url: str
return the url with a resolved hostname
    :type context: behave.runner.Context
    :type url: str
return the url with a resolved hostname : type context : behave . runner . Context : type url : str
def resolve_url(context, url):
    """
    return the url with a resolved hostname
    :type context: behave.runner.Context
    :type url: str
    """
    pseudo = re.match(r'(\S+)://([^/]+)(.*)', url)
    if not pseudo:
        return url
    scheme = pseudo.group(1)
    fqdn = pseudo.group(2)
    path = pseudo.group(3)
    return '{}://{}{}'.format(scheme, resolve_hostname(context, fqdn), path)
def resolve_url ( context , url ) : pseudo = re . match ( r'(\S+)://([^/]+)(.*)' , url ) if not pseudo : return url scheme = pseudo . group ( 1 ) fqdn = pseudo . group ( 2 ) path = pseudo . group ( 3 ) return '{}://{}{}' . format ( scheme , resolve_hostname ( context , fqdn ) , path )