From 2bf876d5bb172803735606777975a74ea1f0b0d1 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 13 Sep 2016 09:03:44 -0700 Subject: [PATCH] tests: Add HomeTest._sanity_check(). --- zerver/tests/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zerver/tests/tests.py b/zerver/tests/tests.py index 7427bc46ee..0eb6778bc7 100644 --- a/zerver/tests/tests.py +++ b/zerver/tests/tests.py @@ -1873,6 +1873,16 @@ class HomeTest(ZulipTestCase): result = self.client_get('/', dict(**kwargs)) return result + def _sanity_check(self, result): + # type: (HttpResponse) -> None + ''' + Use this for tests that are geared toward specific edge cases, but + which still want the home page to load properly. + ''' + html = result.content.decode('utf-8') + if 'Compose your message' not in html: + self.fail('Home page probably did not load.') + def test_terms_of_service(self): # type: () -> None email = 'hamlet@zulip.com'