<commit_before>import pytest

from pyramid import testing


def test_detail_view():
    from .views import detail_view
    request = testing.DummyRequest()
    info = detail_view(request)
    assert "title" in info

# ------- Functional Tests -------

@pytest.fixture()
def testapp():
    from learning_journal_basic import main
    app = main({})
    from webtest import TestApp
    return TestApp(app)

def test_layout_root(testapp):
    response = testapp.get('/', status=200)
    assert b'This is text for test entry' in response.body

def test_root_contents(testapp):
    response = testapp.get('/', status=200)
    assert b'<article>' in response.body
<commit_msg>finished tests<commit_after>import pytest

from pyramid import testing


def test_entry_view():
    from .views import entry_view
    request = testing.DummyRequest()
    info = entry_view(request)
    assert 'entries' in info


def test_detail_view():
    from .views import detail_view
    request = testing.DummyRequest()
    request.matchdict = {'id': '1'}
    info = detail_view(request)
    assert 'body' in info


def test_edit_view():
    from .views import edit_view
    request = testing.DummyRequest()
    request.matchdict = {'id': '1'}
    info = edit_view(request)
    assert 'body' in info

# ------- Functional Tests -------


@pytest.fixture()
def testapp():
    from learning_journal_basic import main
    app = main({})
    from webtest import TestApp
    return TestApp(app)


def test_layout_root(testapp):
    response = testapp.get('/', status=200)
    assert b'<NAME>' in response.body


def test_root_contents(testapp):
    response = testapp.get('/', status=200)
    assert b'<article>' in response.body

{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.00823529411764706, 'mean_word_length': 3.4528795811518322, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1340420', 'n_tokens_mistral': 537, 'n_tokens_neox': 515, 'n_words': 150}