test_decorators: Fix strict_optional errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-04 16:08:19 -07:00
committed by Tim Abbott
parent c65e7772a7
commit d690cc32e1
2 changed files with 2 additions and 4 deletions

View File

@@ -565,7 +565,7 @@ body:
def test_authenticated_rest_api_view_with_non_webhook_view(self) -> None:
@authenticated_rest_api_view()
def non_webhook_view_raises_exception(request: HttpRequest, user_profile: UserProfile=None) -> None:
def non_webhook_view_raises_exception(request: HttpRequest, user_profile: UserProfile) -> None:
raise Exception("raised by a non-webhook view")
request = HostRequestMock()
@@ -1813,7 +1813,7 @@ class TestUserAgentParsing(ZulipTestCase):
for line in open(user_agents_path).readlines():
line = line.strip()
match = re.match('^(?P<count>[0-9]+) "(?P<user_agent>.*)"$', line)
self.assertIsNotNone(match)
assert match is not None
groupdict = match.groupdict()
count = groupdict["count"]
user_agent = groupdict["user_agent"]