From 08d20dce23b18baf08f3be91c6a7fa7519daf203 Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Sat, 5 May 2018 01:21:05 +0530 Subject: [PATCH] docs: Cover the missing case in DocPageTest. --- zerver/tests/test_docs.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index f8cb5d75d8..c6db7cf122 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -51,8 +51,8 @@ class DocPageTest(ZulipTestCase): if not landing_page: return - # Test the URL on the root subdomain with the landing page setting with self.settings(ROOT_DOMAIN_LANDING_PAGE=True): + # Test the URL on the root subdomain with the landing page setting result = self.get_doc(url, subdomain="") self.assertEqual(result.status_code, 200) self.assertIn(expected_content, str(result.content)) @@ -64,6 +64,15 @@ class DocPageTest(ZulipTestCase): self.assert_in_success_response([''], result) + # Test the URL on the "zephyr" subdomain with the landing page setting + result = self.get_doc(url, subdomain="zephyr") + self.assertEqual(result.status_code, 200) + self.assertIn(expected_content, str(result.content)) + for s in extra_strings: + self.assertIn(s, str(result.content)) + if not doc_html_str: + self.assert_in_success_response([''], result) + @slow("Tests dozens of endpoints, including generating lots of emails") def test_doc_endpoints(self) -> None: self._test('/api/', 'The Zulip API')