'Testing whether the API returns the right JSON data if a rss feeds from a channel are fetched'

@deferred(timeout=10)
def test_rss_feeds_endpoint_with_channel(self):

    expected_json = {u'rssfeeds': [{u'url': u'http://test1.com/feed.xml'}, {u'url': u'http://test2.com/feed.xml'}]}
    channel_name = 'my    channel'
    self.create_fake_channel(channel_name, 'this    is    a    short    description')
    channel_obj = self.session.lm.channel_manager.get_channel(channel_name)
    for rss_item in expected_json[u'rssfeeds']:
        channel_obj.create_rss_feed(rss_item[u'url'])
    return self.do_request(('channels/discovered/%s/rssfeeds' % 'fakedispersyid'.encode('hex')), expected_code=200, expected_json=expected_json)
