'json_get_subscribers in zerver/views/streams.py
also returns the list of subscribers for a stream.'

def test_json_get_subscribers(self):

    stream_name = gather_subscriptions(self.user_profile)[0][0]['name']
    stream_id = get_stream(stream_name, self.user_profile.realm).id
    expected_subscribers = gather_subscriptions(self.user_profile)[0][0]['subscribers']
    result = self.client_get(('/json/streams/%d/members' % (stream_id,)))
    self.assert_json_success(result)
    result_dict = ujson.loads(result.content)
    self.assertIn('subscribers', result_dict)
    self.assertIsInstance(result_dict['subscribers'], list)
    subscribers = []
    for subscriber in result_dict['subscribers']:
        self.assertIsInstance(subscriber, six.string_types)
        subscribers.append(subscriber)
    self.assertEqual(set(subscribers), set(expected_subscribers))
