Skip to content

Commit cf1870c

Browse files
Chris OgbuehiChris Ogbuehi
authored andcommitted
update test for optional perms
1 parent f9e14ff commit cf1870c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

permafrost/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ def test_update_form_has_selected_optional_permission(self):
469469
uri = reverse('permafrost:role-update', kwargs={'slug': 'test-role'})
470470
response = self.client.get(uri)
471471
try:
472-
self.assertEqual(str(list(response.context['form'].fields['permissions'].choices)[0][0]), '37')
473-
self.assertEqual(str(list(response.context['form'].fields['permissions'].choices)[1][0]), '38')
472+
self.assertTrue(response.context['permission_categories']['permafrostrole']['optional'][0].selected)
473+
self.assertTrue(response.context['permission_categories']['permafrostrole']['optional'][1].selected)
474474
self.assertContains(response, 'value="37"')
475475
self.assertContains(response, 'value="38"')
476476
self.assertContains(response, 'id="permission-37"')

0 commit comments

Comments
 (0)