Unit tests fail with requests<2.3.0

Bug #1442919 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Critical
Brant Knudson

Bug Description

The keystoneclient unit tests are failing when using requests<2.3.0. The current requirement is has requests>=2.2.0,!=2.4.0, so this needs to be supported.

Two tests are failing:

- keystoneclient.tests.unit.v3.test_auth_saml2.AuthenticateviaADFSTests.test_end_to_end_workflow
- keystoneclient.tests.unit.v3.test_auth_saml2.AuthenticateviaADFSTests.test_check_valid_token_when_authenticated

They both fail in the same way:

...
   File "/opt/stack/python-keystoneclient/.tox/py27/local/lib/python2.7/site-packages/requests/cookies.py", line 128, in extract_cookies_to_jar
    jar.extract_cookies(res, req)
 AttributeError: 'list' object has no attribute 'extract_cookies'

Brant Knudson (blk-u)
tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/172655

Changed in python-keystoneclient:
assignee: nobody → Brant Knudson (blk-u)
status: New → In Progress
Revision history for this message
Brant Knudson (blk-u) wrote :

This is one of the causes of stable/juno not being able to get updated requirements.

Changed in python-keystoneclient:
importance: Undecided → Critical
Revision history for this message
Brant Knudson (blk-u) wrote :

See https://review.openstack.org/#/c/172220/ for the stable/juno failure.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/172655
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=a335b7f6f2577f06cead7b7acbfa07dd771a94b9
Submitter: Jenkins
Branch: master

commit a335b7f6f2577f06cead7b7acbfa07dd771a94b9
Author: Brant Knudson <email address hidden>
Date: Sat Apr 11 10:28:49 2015 -0500

    Fix tests to work with requests<2.3

    The tests didn't pass with requests<2.3 because of the cookies
    monkey-patching.

    To test this, make sure the requests library in your tox venv is
    the right level:

     $ .tox/py27/bin/pip install -U "requests<2.3"

    Then run the tests.

    Closes-Bug: 1442919
    Change-Id: Ie93906ba2370dada2386a50ae2137337ccf98f10

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (stable/juno)

Reviewed: https://review.openstack.org/172256
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=a4f80b5c64e1a2645384665cb60a924342230581
Submitter: Jenkins
Branch: stable/juno

commit a4f80b5c64e1a2645384665cb60a924342230581
Author: Brant Knudson <email address hidden>
Date: Sat Apr 11 10:28:49 2015 -0500

    Fix tests to work with requests<2.3

    The tests didn't pass with requests<2.3 because of the cookies
    monkey-patching.

    To test this, make sure the requests library in your tox venv is
    the right level:

     $ .tox/py27/bin/pip install -U "requests<2.3"

    Then run the tests.

    Closes-Bug: 1442919
    Change-Id: Ie93906ba2370dada2386a50ae2137337ccf98f10
    (cherry picked from commit a335b7f6f2577f06cead7b7acbfa07dd771a94b9)

tags: added: in-stable-juno
Changed in python-keystoneclient:
milestone: none → 1.4.0
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.