Page MenuHomePhabricator

test_follow_redirects fails on Travis
Closed, ResolvedPublic

Description

    def test_follow_redirects(self):
        """Test follow 301 redirects correctly."""
        # The following will redirect from ' ' -> '_', and maybe to https://
        r = http.fetch(uri='http://en.wikipedia.org/wiki/Main%20Page')
        self.assertEqual(r.status, 200)
        self.assertIsNotNone(r.data.history)
        self.assertIn('//en.wikipedia.org/wiki/Main_Page',
                      r.data.url)
    
        r = http.fetch(uri='http://www.gandi.eu')
        self.assertEqual(r.status, 200)
        self.assertEqual(r.data.url,
>                        'http://www.gandi.net')
E       AssertionError: u'https://www.gandi.net/' != u'http://www.gandi.net'
E       - https://www.gandi.net/
E       ?     -                -
E       + http://www.gandi.net