(dbs)
Fix database names for REUSE_DB

    Django automatically uses test database names when testing, but
    only if the test database setup routine is called. This allows us
    to safely skip the test database setup with REUSE_DB.
Fix database names for REUSE_DB
Fix database names for REUSE_DB
def assign_test_db_names(dbs):
    """Fix database names for REUSE_DB

    Django automatically uses test database names when testing, but
    only if the test database setup routine is called. This allows us
    to safely skip the test database setup with REUSE_DB.
    """
    for db in dbs.values():
        test_db_name = get_db_name(db['NAME'], True)
        db['NAME'] = db.setdefault('TEST', {}).setdefault('NAME', test_db_name)
def assign_test_db_names ( dbs ) : for db in dbs . values ( ) : test_db_name = get_db_name ( db [ 'NAME' ] , True ) db [ 'NAME' ] = db . setdefault ( 'TEST' , { } ) . setdefault ( 'NAME' , test_db_name )