From 985e373acf5e80b5b1b2bf405cc7ee01131fb439 Mon Sep 17 00:00:00 2001 From: Armaan Ahluwalia Date: Wed, 2 May 2018 18:58:58 +0530 Subject: [PATCH] test_home: Change requiring pygments.css to requiring app-styles.js. This commit changes the tests based on the fact that pygments.css will no longer be found in the template during testing. pygemnts.css is being compiled by webpack under app-styles and so we look for the stubentry for app-styles instead. --- zerver/tests/test_home.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index 5086685dd61ed3..54022da55089fd 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -37,7 +37,8 @@ def test_home(self) -> None: 'Next message', 'Search streams', 'Welcome to Zulip', - 'pygments.css', + # Check for the presence of the app-styles-stubentry + 'app-styles.*\.js', 'var page_params', ] @@ -201,9 +202,8 @@ def test_home(self) -> None: self.assert_length(cache_mock.call_args_list, 7) html = result.content.decode('utf-8') - for html_bit in html_bits: - if html_bit not in html: + if re.search(html_bit, html) is None: raise AssertionError('%s not in result' % (html_bit,)) page_params = self._get_page_params(result)