ross / requests-futures

Asynchronous Python HTTP Requests for Humans using Futures
Other
2.11k stars 152 forks source link

test_redirect fails with 404 where expecting 200 #94

Closed PureTryOut closed 2 years ago

PureTryOut commented 4 years ago
===================================================== FAILURES ======================================================
__________________________________________ RequestsTestCase.test_redirect ___________________________________________

self = <test_requests_futures.RequestsTestCase testMethod=test_redirect>

    def test_redirect(self):
        """ Tests for the ability to cleanly handle redirects. """
        sess = FuturesSession()
        future = sess.get(httpbin('redirect-to?url=get'))
        self.assertIsInstance(future, Future)
        resp = future.result()
        self.assertIsInstance(resp, Response)
>       self.assertEqual(200, resp.status_code)
E       AssertionError: 200 != 404

test_requests_futures.py:115: AssertionError
_____________________________ RequestsProcessPoolTestCase.test_futures_existing_session _____________________________

self = <test_requests_futures.RequestsProcessPoolTestCase testMethod=test_futures_existing_session>

    def test_futures_existing_session(self):
        self.session.headers['Foo'] = 'bar'
>       self._assert_futures_session(session=self.session)

test_requests_futures.py:190: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_requests_futures.py:237: in _assert_futures_session
    self.assertEqual(200, resp.status_code)
E   AssertionError: 200 != 404
_________________________________ RequestsProcessPoolTestCase.test_futures_session __________________________________

self = <test_requests_futures.RequestsProcessPoolTestCase testMethod=test_futures_session>

    @skipIf(session_required, 'not supported in python < 3.5')
    def test_futures_session(self):
>       self._assert_futures_session()

test_requests_futures.py:181: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_requests_futures.py:237: in _assert_futures_session
    self.assertEqual(200, resp.status_code)
E   AssertionError: 200 != 404

This is on 1.0.0 from PyPi.

ross commented 4 years ago

Looks like something is broken in httpbin, https://github.com/postmanlabs/httpbin/issues/617.

It's been that way for a month or so without response. Looks like nothing (in that repo at least) has been merged in almost a year. Short of running a localhost copy of httpbin or pointing the tests somewhere else I'm not sure what options there'd be.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.