tests: Test RuntimeError logic for realm check.

This commit is contained in:
Steve Howell 2018-08-11 13:29:04 +00:00 committed by Tim Abbott
parent 101446ec52
commit e9a31232df
1 changed files with 7 additions and 0 deletions

View File

@ -375,6 +375,13 @@ class InternalPrepTest(ZulipTestCase):
message = result['message']
self.assertIn('message was too long', message.content)
with self.assertRaises(RuntimeError):
internal_prep_private_message(
realm=None, # should cause error
sender=sender,
recipient_user=recipient_user,
content=content)
class ExtractedRecipientsTest(TestCase):
def test_extract_recipients(self) -> None: