test_subs: Use HostRequestMock for request object.

I incorrectly removed this when simplifying
dbddbee5a115b9352862cb13d4c66820865c30b6; while that commit did not
require the hunk re-added here, the later commit
3be622ffa7 added a call that did require it.
This commit is contained in:
Tim Abbott 2022-02-04 15:36:40 -08:00
parent 39dea1feaf
commit 1045737be6
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,7 @@ from zerver.lib.streams import (
)
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.test_helpers import (
HostRequestMock,
cache_tries_captured,
get_subscription,
most_recent_message,
@ -3512,6 +3513,7 @@ class SubscriptionRestApiTest(ZulipTestCase):
user_profile = self.example_user("hamlet")
user_profile.full_name = "Hamlet"
user_profile.save()
request = HostRequestMock(user_profile=user_profile)
def thunk1() -> HttpResponse:
user_profile.full_name = "Should not be committed"