'Ensure a request for the \'real\' path to a document results in a
redirect to the internal redirect path'

def test_actual_wiki_url_redirect(self):

    url = ('/en-US/docs/%s?raw=1' % self.middle_doc.slug)
    response = self.client.get(url, follow=False)
    eq_(302, response.status_code)
    eq_('http://testserver/en-US/ExtraWiki/Middle?raw=1', response['Location'])
    self.root_zone.url_root = 'NewRoot'
    self.root_zone.save()
    url = ('/en-US/docs/%s?raw=1' % self.middle_doc.slug)
    response = self.client.get(url, follow=False)
    eq_(302, response.status_code)
    eq_('http://testserver/en-US/NewRoot/Middle?raw=1', response['Location'])
