def _get_db_name(db_settings, suffix):
    "This provides the default test db name that Django uses."
    from django import VERSION as DJANGO_VERSION

    name = None
    try:
        if DJANGO_VERSION > (1, 7):
            name = db_settings['TEST']['NAME']
        elif DJANGO_VERSION < (1, 7):
            name = db_settings['TEST_NAME']
    except __HOLE__:
        pass

    if not name:
        if db_settings['ENGINE'] == 'django.db.backends.sqlite3':
            return ':memory:'
        else:
            name = 'test_' + db_settings['NAME']

    if suffix:
        name = '%s_%s' % (name, suffix)
    return name
dataset/ETHPy150Open pytest-dev/pytest-django/pytest_django/db_reuse.py/_get_db_name