mirror of https://github.com/zulip/zulip.git
Add feedback bot to the test database.
This commit is contained in:
parent
6324fe9ddf
commit
af6512e782
|
@ -113,7 +113,7 @@ class TestCrossRealmPMs(ZulipTestCase):
|
|||
user1a = self.create_user(user1a_email)
|
||||
user2 = self.create_user(user2_email)
|
||||
self.create_user(user3_email)
|
||||
feedback_bot = self.create_user(feedback_email)
|
||||
feedback_bot = get_user_profile_by_email(feedback_email)
|
||||
support_bot = self.create_user(support_email)
|
||||
|
||||
# Users can PM themselves
|
||||
|
|
|
@ -1352,7 +1352,7 @@ class SubscriptionAPITest(ZulipTestCase):
|
|||
set([email1, email2, self.test_email])
|
||||
)
|
||||
|
||||
self.assertEqual(len(add_peer_event['users']), 13)
|
||||
self.assertEqual(len(add_peer_event['users']), 14)
|
||||
self.assertEqual(add_peer_event['event']['type'], 'subscription')
|
||||
self.assertEqual(add_peer_event['event']['op'], 'peer_add')
|
||||
self.assertEqual(add_peer_event['event']['user_email'], self.test_email)
|
||||
|
@ -1381,7 +1381,7 @@ class SubscriptionAPITest(ZulipTestCase):
|
|||
|
||||
# We don't send a peer_add event to othello
|
||||
self.assertNotIn(user_profile.id, add_peer_event['users'])
|
||||
self.assertEqual(len(add_peer_event['users']), 13)
|
||||
self.assertEqual(len(add_peer_event['users']), 14)
|
||||
self.assertEqual(add_peer_event['event']['type'], 'subscription')
|
||||
self.assertEqual(add_peer_event['event']['op'], 'peer_add')
|
||||
self.assertEqual(add_peer_event['event']['user_email'], email3)
|
||||
|
|
|
@ -267,10 +267,14 @@ class Command(BaseCommand):
|
|||
("Zulip Commit Bot", "commit-bot@zulip.com"),
|
||||
("Zulip Trac Bot", "trac-bot@zulip.com"),
|
||||
("Zulip Nagios Bot", "nagios-bot@zulip.com"),
|
||||
("Zulip Feedback Bot", "feedback@zulip.com"),
|
||||
]
|
||||
create_users(realms, internal_zulip_users_nosubs, bot_type=UserProfile.DEFAULT_BOT)
|
||||
|
||||
zulip_cross_realm_bots = [
|
||||
("Zulip Feedback Bot", "feedback@zulip.com"),
|
||||
]
|
||||
create_users(realms, zulip_cross_realm_bots, bot_type=UserProfile.DEFAULT_BOT)
|
||||
|
||||
# Mark all messages as read
|
||||
UserMessage.objects.all().update(flags=UserMessage.flags.read)
|
||||
|
||||
|
|
Loading…
Reference in New Issue