<commit_before>import tempfile

import pytest

from toolshed import create_app
from toolshed.extensions import db as _db


dbfile = tempfile.NamedTemporaryFile(delete=False)
dbfile.close()

TEST_DATABASE_FILE = dbfile.name
TEST_DATABASE_URI = "postgres://localhost/" + TEST_DATABASE_FILE
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED = False
DEBUG_TB_INTERCEPT_REDIRECTS = False
SQLALCHEMY_DATABASE_URI = TEST_DATABASE_URI
WTF_CSRF_ENABLED = False



@pytest.fixture
def app():
    app = create_app()
    app.config.from_object(__name__)
    return app


@pytest.fixture<commit_msg>Give SQLAlchemy the postgresql testing database.<commit_after>import pytest

from toolshed import create_app
from toolshed.extensions import db as _db


TEST_DATABASE_URI = "postgres://localhost/testdb"
TESTING = True
DEBUG = False
DEBUG_TB_ENABLED = False
DEBUG_TB_INTERCEPT_REDIRECTS = False
SQLALCHEMY_DATABASE_URI = TEST_DATABASE_URI
WTF_CSRF_ENABLED = False



@pytest.fixture
def app():
    app = create_app()
    app.config.from_object(__name__)
    return app


@pytest.fixture
{'fraction_non_alphanumeric': 0.06935332708528585, 'fraction_numerical': 0.0, 'mean_word_length': 5.552147239263804, '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': '5958618', 'n_tokens_mistral': 378, 'n_tokens_neox': 377, 'n_words': 82}