test_bugdown: Fix i18n test flakiness with markdown rendering tests.

It appears that the assertRaisesRegexp approach we had before didn't
work properly on some systems, likely due to a bad interact with a
i18n (we haven't definitively determined the cause).
This commit is contained in:
Tim Abbott
2016-09-16 11:49:30 -07:00
parent a036a72db6
commit 2c19719cee

View File

@@ -578,5 +578,7 @@ class BugdownErrorTests(ZulipTestCase):
message = 'whatever' message = 'whatever'
with self.simulated_markdown_failure(): with self.simulated_markdown_failure():
with self.assertRaisesRegexp(JsonableError, 'Unable to render message'): # We don't use assertRaisesRegexp because it seems to not
# handle i18n properly here on some systems.
with self.assertRaises(JsonableError):
self.send_message("othello@zulip.com", "Denmark", Recipient.STREAM, message) self.send_message("othello@zulip.com", "Denmark", Recipient.STREAM, message)