Fixes mock in test

This commit is contained in:
Mouse Reeve 2021-10-20 13:56:55 -07:00
parent 87deac17f9
commit b64a616ff9

View file

@ -52,7 +52,7 @@ class ShelfViews(TestCase):
shelf = self.local_user.shelf_set.first() shelf = self.local_user.shelf_set.first()
request = self.factory.get("") request = self.factory.get("")
request.user = self.local_user request.user = self.local_user
with patch("bookwyrm.views.shelf.is_api_request") as is_api: with patch("bookwyrm.views.shelf.shelf.is_api_request") as is_api:
is_api.return_value = False is_api.return_value = False
result = view(request, self.local_user.username, shelf.identifier) result = view(request, self.local_user.username, shelf.identifier)
self.assertIsInstance(result, TemplateResponse) self.assertIsInstance(result, TemplateResponse)