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

from fixture.application import Application
from model.group import Group


@pytest.fixture
def app(request):
    fixture = Application()
    request.addfinalizer(fixture.destroy)
    return fixture


def test_add_group(app):
    app.session.login( username="admin", password="<PASSWORD>")
    app.group.create(Group(name="adffff", header="asdf", footer="asdf"))
    app.session.logout()

def test_add_empty_group(app):
    app.session.login( username="admin", password="<PASSWORD>")
    app.group.create(Group(name="", header="", footer=""))
    app.session.logout()

<commit_msg>Задание 4<commit_after># -*- coding: utf-8 -*-
import pytest

from fixture.application import Application
from model.group import Group


@pytest.fixture
def app(request):
    fixture = Application()
    request.addfinalizer(fixture.destroy)
    return fixture


def test_add_group(app):
    app.session.login(wd="admin", username="admin", password="<PASSWORD>")
    app.group.create(Group(name="adffff", header="asdf", footer="asdf"))
    app.session.logout()

def test_add_empty_group(app):
    app.session.login(wd="admin", username="admin", password="<PASSWORD>")
    app.group.create(Group(name="", header="", footer=""))
    app.session.logout()


{'fraction_non_alphanumeric': 0.16149068322981366, 'fraction_numerical': 0.002329192546583851, 'mean_word_length': 4.967592592592593, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6850736', 'n_tokens_mistral': 413, 'n_tokens_neox': 413, 'n_words': 79}