def _get_db_name(db_settings, suffix):
    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 KeyError:
        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
Scale a bem file
dataset/ETHPy150Open pytest-dev/pytest-django/pytest_django/db_reuse.py/_get_db_name--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/coreg.py/scale_bem