def get_connect_string(backend, database, user=None, passwd=None,
                       host='localhost'):
    """Get database connection

    Try to get a connection with a very specific set of values, if we get
    these then we'll run the tests, otherwise they are skipped

    DEPRECATED: this function is deprecated and will be removed from oslo_db
    in a few releases. Please use the provisioning system for dealing
    with URLs and database provisioning.

    """
    args = {'backend': backend,
            'user': user,
            'passwd': passwd,
            'host': host,
            'database': database}
    if backend == 'sqlite':
        template = '%(backend)s:///%(database)s'
    else:
        template = "%(backend)s://%(user)s:%(passwd)s@%(host)s/%(database)s"
    return template % args
dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/utils.py/get_connect_string/original