mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Fixes tests (again)
This commit is contained in:
parent
35cb3fa8fc
commit
e1d24577d4
2 changed files with 5 additions and 3 deletions
|
@ -122,11 +122,11 @@ class ReportViews(TestCase):
|
||||||
request.user.is_superuser = True
|
request.user.is_superuser = True
|
||||||
|
|
||||||
# de-activate
|
# de-activate
|
||||||
views.suspend_user(request, self.local_user.id)
|
views.suspend_user(request, self.rat.id)
|
||||||
self.rat.refresh_from_db()
|
self.rat.refresh_from_db()
|
||||||
self.assertFalse(self.rat.is_active)
|
self.assertFalse(self.rat.is_active)
|
||||||
|
|
||||||
# re-activate
|
# re-activate
|
||||||
views.suspend_user(request, self.local_user.id)
|
views.suspend_user(request, self.rat.id)
|
||||||
self.rat.refresh_from_db()
|
self.rat.refresh_from_db()
|
||||||
self.assertTrue(self.rat.is_active)
|
self.assertTrue(self.rat.is_active)
|
||||||
|
|
|
@ -38,7 +38,9 @@ class UserAdminViews(TestCase):
|
||||||
request = self.factory.get("")
|
request = self.factory.get("")
|
||||||
request.user = self.local_user
|
request.user = self.local_user
|
||||||
request.user.is_superuser = True
|
request.user.is_superuser = True
|
||||||
result = view(request, self.local_user)
|
|
||||||
|
result = view(request, self.local_user.id)
|
||||||
|
|
||||||
self.assertIsInstance(result, TemplateResponse)
|
self.assertIsInstance(result, TemplateResponse)
|
||||||
result.render()
|
result.render()
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
|
|
Loading…
Reference in a new issue