tests: Add HomeTest._sanity_check().

This commit is contained in:
Steve Howell 2016-09-13 09:03:44 -07:00 committed by Tim Abbott
parent dc2dde1509
commit 2bf876d5bb
1 changed files with 10 additions and 0 deletions

View File

@ -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'