Page MenuHomePhabricator

test_follow_redirects AssertionError: u'https://www.gandi.net/en' != u'https://www.gandi.net/'
Closed, ResolvedPublic

Description

https://travis-ci.org/wikimedia/pywikibot-core/jobs/270836352#L4396

=================================== FAILURES ===================================

_____________________ TestHttpStatus.test_follow_redirects _____________________

self = <tests.http_tests.TestHttpStatus testMethod=test_follow_redirects>

    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,

>                        'https://www.gandi.net/')

E       AssertionError: u'https://www.gandi.net/en' != u'https://www.gandi.net/'

E       - https://www.gandi.net/en

E       ?                       --

E       + https://www.gandi.net/

Apparently the redirect target for http://www.gandi.eu has been changed to https://www.gandi.net/en.

Event Timeline

Change 375389 had a related patch set uploaded (by Dalba; owner: Dalba):
[pywikibot/core@master] http_tests.py: Update the redirect target for www.gandi.eu

https://gerrit.wikimedia.org/r/375389

The last time we had updated the redirect target was in T152769: test_follow_redirects fails on Travis (Dec 9 2016)

Xqt triaged this task as High priority.Sep 2 2017, 12:59 PM

Change 375389 merged by jenkins-bot:
[pywikibot/core@master] http_tests.py: Update the redirect target for www.gandi.eu

https://gerrit.wikimedia.org/r/375389