<commit_before># -*- coding: utf-8 -*-


from contextlib import closing
import pytest


from journal import app
from journal import connect_db
from journal import get_database_connection
from journal import init_db


TEST_DSN = 'dbname=test_learning_journal user=elizabethrives'


def clear_db():
    with closing(connect_db()) as db:
        db.cursor().execute("DROP TABLE entries")
        db.commit()

@pytest.fixture(scope='session')
def test_app():
    """configure our app for use in testing"""
    app.config['DATABASE'] = TEST_DSN<commit_msg>deleted username role<commit_after># -*- coding: utf-8 -*-


from contextlib import closing
import pytest


from journal import app
from journal import connect_db
from journal import get_database_connection
from journal import init_db


TEST_DSN = 'dbname=test_learning_journal'


def clear_db():
    with closing(connect_db()) as db:
        db.cursor().execute("DROP TABLE entries")
        db.commit()

@pytest.fixture(scope='session')
def test_app():
    """configure our app for use in testing"""
    app.config['DATABASE'] = TEST_DSN
{'fraction_non_alphanumeric': 0.10550458715596331, 'fraction_numerical': 0.001834862385321101, 'mean_word_length': 4.400990099009901, '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': '4962105', 'n_tokens_mistral': 330, 'n_tokens_neox': 324, 'n_words': 100}