From 4ab584daa489cdb776b90d9ba52a88771937d0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= Date: Fri, 9 Jul 2021 17:55:04 +0200 Subject: [PATCH] misc: fix expression-not-assigned pylint error (#55505) --- tests/manager/test_all.py | 2 -- tests/test_agendas.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/manager/test_all.py b/tests/manager/test_all.py index 3111807c..b410ebf2 100644 --- a/tests/manager/test_all.py +++ b/tests/manager/test_all.py @@ -397,7 +397,6 @@ def test_add_agenda_and_set_role(app, admin_user, manager_user): resp = app.get('/manage/agendas/%s/settings' % agenda.id) resp = resp.click('Configure', href='roles') - manager_user.groups.all()[0] resp.form['edit_role'] = manager_user.groups.all()[0].pk resp = resp.form.submit().follow() assert 'Edit Role: Managers' in resp.text @@ -4369,7 +4368,6 @@ def test_manager_agenda_roles(app, admin_user, manager_user): resp = app.get('/manage/agendas/%s/settings' % agenda.id) resp = resp.click('Configure', href='roles') - manager_user.groups.all()[0] resp.form['edit_role'] = manager_user.groups.all()[0].pk resp = resp.form.submit().follow() diff --git a/tests/test_agendas.py b/tests/test_agendas.py index 7b57cf45..a5693261 100644 --- a/tests/test_agendas.py +++ b/tests/test_agendas.py @@ -878,8 +878,8 @@ def test_management_role_deletion(): Group.objects.all().delete() - Agenda.objects.get(id=agenda.id).view_role is None - Agenda.objects.get(id=agenda.id).edit_role is None + assert Agenda.objects.get(id=agenda.id).view_role is None + assert Agenda.objects.get(id=agenda.id).edit_role is None def test_event_bookings_annotation():