test_middleware: Narrow the type of open_graph_description.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-06-23 10:47:06 -04:00
committed by Tim Abbott
parent cf455131ef
commit 6400cd93ea

View File

@@ -79,6 +79,7 @@ class OpenGraphTest(ZulipTestCase):
open_graph_description = assert_is_not_none(
bs.select_one('meta[property="og:description"]')
).get("content")
assert isinstance(open_graph_description, str)
for substring in in_description:
self.assertIn(substring, open_graph_description)
for substring in not_in_description: