Reorganize sections of test_realm_scenarios().

This change groups the positive scenarios together
and likewise for the negative scenarios.
This commit is contained in:
Steve Howell
2016-11-02 08:29:41 -07:00
committed by Tim Abbott
parent 49c64bd7cb
commit b9bf74d54e

View File

@@ -111,14 +111,6 @@ class TestCrossRealmPMs(ZulipTestCase):
self.assertEqual(len(messages), 1)
self.assertEquals(messages[0].sender.pk, user1.pk)
"""Users on the different realms can not PM each other"""
with assert_disallowed():
self.send_message(user1_email, user2_email, Recipient.PERSONAL)
"""Users on three different realms can not PM each other"""
with assert_disallowed():
self.send_message(user1_email, [user2_email, user3_email], Recipient.PERSONAL)
"""OG Users in the zulip.com realm can PM any realm"""
self.send_message(cross_email, user2_email, Recipient.PERSONAL)
@@ -140,6 +132,14 @@ class TestCrossRealmPMs(ZulipTestCase):
self.send_message(user1_email, [user2_email, cross_email],
Recipient.PERSONAL)
# Users on the different realms can not PM each other
with assert_disallowed():
self.send_message(user1_email, user2_email, Recipient.PERSONAL)
# Users on three different realms can not PM each other
with assert_disallowed():
self.send_message(user1_email, [user2_email, user3_email], Recipient.PERSONAL)
class PersonalMessagesTest(ZulipTestCase):
def test_auto_subbed_to_personals(self):