Test bot_owner logic in /json/users

This fixes a small gap in our coverage for get_members_backend.
This commit is contained in:
Steve Howell 2016-07-12 19:28:54 -07:00 committed by Tim Abbott
parent af8047967f
commit aea79517f5
1 changed files with 7 additions and 0 deletions

View File

@ -579,6 +579,13 @@ class BotTest(AuthedTestCase):
event['event']
)
users_result = self.client.get('/json/users')
members = ujson.loads(users_result.content)['members']
bots = [m for m in members if m['email'] == 'hambot-bot@zulip.com']
self.assertEqual(len(bots), 1)
bot = bots[0]
self.assertEqual(bot['bot_owner'], 'hamlet@zulip.com')
def test_add_bot_with_default_sending_stream(self):
# type: () -> None
self.login("hamlet@zulip.com")