mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Patch broadcast in test
This commit is contained in:
parent
63509c954d
commit
2c013b677b
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
""" test for app action functionality """
|
||||
from unittest.mock import patch
|
||||
from django.contrib.auth.models import Group
|
||||
from django.template.response import TemplateResponse
|
||||
from django.test import TestCase
|
||||
|
@ -58,6 +59,7 @@ class UserAdminViews(TestCase):
|
|||
request.user = self.local_user
|
||||
request.user.is_superuser = True
|
||||
|
||||
with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"):
|
||||
result = view(request, self.local_user.id)
|
||||
|
||||
self.assertIsInstance(result, TemplateResponse)
|
||||
|
|
Loading…
Reference in a new issue