Skip to content

Commit 1ce18a4

Browse files
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.
1 parent 60604c7 commit 1ce18a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

zerver/tests/test_home.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_home(self) -> None:
3737
'Next message',
3838
'Search streams',
3939
'Welcome to Zulip',
40-
'pygments.css',
40+
# Check for the presence of the app-styles-stubentry
41+
'app-styles.*\.js',
4142
'var page_params',
4243
]
4344

@@ -201,9 +202,8 @@ def test_home(self) -> None:
201202
self.assert_length(cache_mock.call_args_list, 7)
202203

203204
html = result.content.decode('utf-8')
204-
205205
for html_bit in html_bits:
206-
if html_bit not in html:
206+
if re.search(html_bit, html) is None:
207207
raise AssertionError('%s not in result' % (html_bit,))
208208

209209
page_params = self._get_page_params(result)

0 commit comments

Comments
 (0)