requests-mock 1.7.0 breaks keystoneauth unit tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keystoneauth |
Fix Released
|
Medium
|
Colleen Murphy |
Bug Description
keystoneauth uses requests-mock for unit tests, but it breaks with version 1.7.0 [0].
=======
Failed 1 tests - output below:
=======
keystoneauth1.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/opt/stack/
b' self.assertNotI
b' File "/opt/stack/
b' self.assertThat
b' File "/opt/stack/
b' raise mismatch_error'
b"testtools
b''
Captured pythonlogging:
~~~~~~~
b'GET http://
b''
The regression was introduced with a logging change to request-mock [1]. Keystoneauth will likely need to refactor those tests in order to adopt version 1.7.0. You can reproduce this by:
$ .tox/py37/bin/pip install -U requests-
$ tox -e py37
[0] https:/
[1] https:/
Changed in keystoneauth: | |
status: | New → Confirmed |
status: | Confirmed → Triaged |
importance: | Undecided → Medium |
Changed in keystoneauth: | |
assignee: | nobody → Colleen Murphy (krinkle) |
status: | Triaged → In Progress |
Reviewed: https:/ /review. opendev. org/680515 /git.openstack. org/cgit/ openstack/ keystoneauth/ commit/ ?id=8b06c572927 53e920aac9407a2 fa9659adb5c307
Committed: https:/
Submitter: Zuul
Branch: master
commit 8b06c57292753e9 20aac9407a2fa96 59adb5c307
Author: Colleen Murphy <email address hidden>
Date: Thu Sep 5 13:46:35 2019 -0700
Simplify session logger object tests
With the requests-mock logger now configured to log the request[1],
checking that the logger output does *not* contain the request is
invalid. Simplify these two tests by omitting the assertion.
[1] https:/ /github. com/jamielennox /requests- mock/pull/ 93
Closes-bug: #1842978
Change-Id: If3c0447502917b ce831d3e9f7ae4c 31374dd4380