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, 33, 8, 56), 'model.group.Group', 'Group', (), '', False, 'from model.group import Group\n'), ((18, 33, 18, 59), 'model.group.Group', 'Group', (), '', False, 'from model.group import Group\n'), ((6, 25, 6, 43), 'model.group.Group', 'Group', (), '', False, 'from model.group import Group\n'), ((16, 25, 16, 45), 'model.group.Group', 'Group', (), '', False, 'from model.group import Group\n')]