Skip to content

Commit

Permalink
test_home: Change requiring pygments.css to requiring app-styles.js.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
armaanahluwalia committed May 2, 2018
1 parent 610cc52 commit 985e373
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zerver/tests/test_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 985e373

Please sign in to comment.