Add feedback bot to the test database.

This commit is contained in:
Steve Howell 2016-11-02 15:09:49 -07:00 committed by Tim Abbott
parent 6324fe9ddf
commit af6512e782
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)