from model.group import Group


def test_modify_group_name(app):
    if app.group.count() == 0:
        app.group.create(Group(name="test"))
    old_groups = app.group.get_group_list()
    app.group.modify_first_group(Group(name="New group"))
    new_groups = app.group.get_group_list()
    assert len(old_groups) == len(new_groups)



def test_modify_group_header(app):
    if app.group.count() == 0:
        app.group.create(Group(header="test"))
    old_groups = app.group.get_group_list()
    app.group.modify_first_group(Group(header="New header"))
    new_groups = app.group.get_group_list()
    assert len(old_groups) == len(new_groups)




[(8, 'model.group.Group', 'Group', False, 'from model.group import Group\n'), (18, 'model.group.Group', 'Group', False, 'from model.group import Group\n'), (6, 'model.group.Group', 'Group', False, 'from model.group import Group\n'), (16, 'model.group.Group', 'Group', False, 'from model.group import Group\n')]