Fixes tests (again)

This commit is contained in:
Mouse Reeve 2021-04-19 16:42:51 -07:00
parent 35cb3fa8fc
commit e1d24577d4
2 changed files with 5 additions and 3 deletions

View file

@ -122,11 +122,11 @@ class ReportViews(TestCase):
request.user.is_superuser = True
# de-activate
views.suspend_user(request, self.local_user.id)
views.suspend_user(request, self.rat.id)
self.rat.refresh_from_db()
self.assertFalse(self.rat.is_active)
# re-activate
views.suspend_user(request, self.local_user.id)
views.suspend_user(request, self.rat.id)
self.rat.refresh_from_db()
self.assertTrue(self.rat.is_active)

View file

@ -38,7 +38,9 @@ class UserAdminViews(TestCase):
request = self.factory.get("")
request.user = self.local_user
request.user.is_superuser = True
result = view(request, self.local_user)
result = view(request, self.local_user.id)
self.assertIsInstance(result, TemplateResponse)
result.render()
self.assertEqual(result.status_code, 200)