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

"""Tests the application views.
"""

from test.fixtures import * # noqa
from . import login, logout, get_text
from spz.models import Course, Origin, Degree, Graduation


def test_startpage(client):
    response = client.get('/')
    response_text = get_text(response)
    assert 'Anmeldung' in response_text
    assert 'Kurswahl' in response_text
    assert 'Persönliche Angaben' in response_text
    assert 'Absenden' in response_text


def test_login(client, user, superuser):
    response = login(client, user)
    response_text = get_text(response)
    logout(client)
    assert 'Angemeldet als {} ()'.format(user[0]) in response_text

    response = login(client, superuser)
    response_text = get_text(response)<commit_msg>Add missing import, remove star import<commit_after># -*- coding: utf-8 -*-

"""Tests the application views.
"""

from . import login, logout, get_text
from test.fixtures import client, user, superuser
from spz import app
from spz.models import Course, Origin, Degree, Graduation


def test_startpage(client):
    response = client.get('/')
    response_text = get_text(response)
    assert 'Anmeldung' in response_text
    assert 'Kurswahl' in response_text
    assert 'Persönliche Angaben' in response_text
    assert 'Absenden' in response_text


def test_login(client, user, superuser):
    response = login(client, user)
    response_text = get_text(response)
    logout(client)
    assert 'Angemeldet als {} ()'.format(user[0]) in response_text

    response = login(client, superuser)
    response_text = get_text(response)
{'fraction_non_alphanumeric': 0.103125, 'fraction_numerical': 0.0025, 'mean_word_length': 4.301324503311259, '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': '4793236', 'n_tokens_mistral': 493, 'n_tokens_neox': 485, 'n_words': 144}