Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_decorators: Use the default value of user.
Zixuan James Li2925615ee771
diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.pyindex ffdc3edfa5a..acff2109302 100644--- a/zerver/tests/test_decorators.py+++ b/zerver/tests/test_decorators.py@@ -9,7 +9,6 @@ from unittest import mock, skipUnlessimport orjsonfrom django.conf import settings-from django.contrib.auth.models import AnonymousUserfrom django.core.exceptions import ValidationErrorfrom django.http import HttpRequest, HttpResponsefrom django.utils.timezone import now as timezone_now@@ -1919,8 +1918,7 @@ class TestZulipLoginRequiredDecorator(ZulipTestCase):return HttpResponse("Success")with self.settings(TWO_FACTOR_AUTHENTICATION_ENABLED=True):- user = AnonymousUser()- request = HostRequestMock(user_profile=user)+ request = HostRequestMock()response = test_view(request)self.assertEqual(response.content.decode(), "Success")