'Links to documents in revisions feed with ?all_locales should
reflect proper document locale, regardless of requestor\'s locale'

def test_bug869301_revisions_feed_locale(self):

    d = document(title='HTML9', locale='fr')
    d.save()
    now = datetime.datetime.now()
    for i in xrange(1, 6):
        created = (now + datetime.timedelta(seconds=(5 * i)))
        revision(save=True, document=d, title='HTML9', comment=('Revision    %s' % i), content=('Some    Content    %s' % i), is_approved=True, created=created)
    resp = self.client.get(('%s?all_locales' % reverse('wiki.feeds.recent_revisions', args=(), kwargs={'format': 'rss'}, locale='en-US')))
    self.assertEqual(200, resp.status_code)
    feed = pq(resp.content)
    self.assertEqual(5, len(feed.find('item')))
    for (i, item) in enumerate(feed.find('item')):
        href = pq(item).find('link').text()
        self.assertTrue(('/fr/' in href))
