(dbname, is_test)
return (TEST_DATABASE_PREFIX + dbname) if is_test else dbname
Get databse name (possibly with test prefix)

    :param is_test: Add test prefix if true.
Get databse name (possibly with test prefix)
Get databse name ( possibly with test prefix )
def get_db_name(dbname, is_test):
    """Get databse name (possibly with test prefix)

    :param is_test: Add test prefix if true.
    """
    if isinstance(dbname, bytes):
        dbname = dbname.decode('utf-8')

    return (TEST_DATABASE_PREFIX + dbname) if is_test else dbname
def get_db_name ( dbname , is_test ) : if isinstance ( dbname , bytes ) : dbname = dbname . decode ( 'utf-8' ) return ( TEST_DATABASE_PREFIX + dbname ) if is_test else dbname