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

from learning_journal.models import Entry, DBSession


def test_create_entry(dbtransaction):
    """Assert entry was entered into database."""
    new_entry = Entry(title="Entry1", text="Hey, this works. Awesome.")
    assert new_entry.id is None
    DBSession.flush
    assert new_entry.id is not None
<commit_msg>Modify test file, still doesn't work. Messed around in pshell.<commit_after># -*- coding: utf-8 -*-

from learning_journal.models import Entry, DBSession


def test_create_entry(dbtransaction):
    """Assert entry was entered into database."""
    new_entry = Entry(title="Entry1", text="Hey, this works. Awesome.")
    assert new_entry.id is None
    DBSession.add(new_entry)
    DBSession.flush
    assert new_entry.id is not None

{'fraction_non_alphanumeric': 0.11040609137055837, 'fraction_numerical': 0.005076142131979695, 'mean_word_length': 3.9936708860759493, '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': '2999901', 'n_tokens_mistral': 234, 'n_tokens_neox': 233, 'n_words': 74}