From 7d257b03fc2e8a85d76124f34b033152f8ac9fda Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 19 Sep 2016 17:40:52 -0700 Subject: [PATCH] test: Add coverage for Recipient.__unicode__(). --- zerver/tests/test_subs.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py index dd7723e115..c76c52f234 100644 --- a/zerver/tests/test_subs.py +++ b/zerver/tests/test_subs.py @@ -77,6 +77,18 @@ class TestCreateStreams(ZulipTestCase): actual_stream_names = {stream.name for stream in existing_streams} self.assertEqual(actual_stream_names, set(stream_names)) +class RecipientTest(ZulipTestCase): + def test_recipient(self): + # type: () -> None + realm = get_realm('zulip.com') + stream = get_stream('Verona', realm) + recipient = Recipient.objects.get( + type_id=stream.id, + type=Recipient.STREAM, + ) + self.assertEqual(str(recipient), '' % ( + stream.id, Recipient.STREAM)) + class StreamAdminTest(ZulipTestCase): def test_make_stream_public(self): # type: () -> None