<commit_before>import time
from portality import core, dao
from portality.tasks.redis_huey import main_queue, long_running

import logging
logging.getLogger("requests").setLevel(logging.WARNING)

def prepare_for_test():
    core.app.config['ELASTIC_SEARCH_DB'] = core.app.config['ELASTIC_SEARCH_TEST_DB']

    core.initialise_index(core.app)

    # Ensure all features are enabled so we don't fail feature-specific tests
    core.app.config['FEATURES'] = core.app.config['VALID_FEATURES']

    # Don't contact the configured mail server during tests
    core.app.config['ENABLE_EMAIL'] = False

    main_queue.always_eager = True
    long_running.always_eager = True<commit_msg>Removed unnecessary index init from tests<commit_after>import time
from portality import core, dao
from portality.tasks.redis_huey import main_queue, long_running

import logging
logging.getLogger("requests").setLevel(logging.WARNING)

def prepare_for_test():
    core.app.config['ELASTIC_SEARCH_DB'] = core.app.config['ELASTIC_SEARCH_TEST_DB']

    # Ensure all features are enabled so we don't fail feature-specific tests
    core.app.config['FEATURES'] = core.app.config['VALID_FEATURES']

    # Don't contact the configured mail server during tests
    core.app.config['ENABLE_EMAIL'] = False

    main_queue.always_eager = True
    long_running.always_eager = True
{'fraction_non_alphanumeric': 0.0935412026726058, 'fraction_numerical': 0.0, 'mean_word_length': 5.127272727272727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2809675', 'n_tokens_mistral': 419, 'n_tokens_neox': 413, 'n_words': 97}