Webob >=1.7.0 change its way to check if body is readable [1],
The is_body_readable() method returns False now. request.content_length
will be set when set request.body automatically, and if
request.context_length is None request.body will return returns b''.[3]
So just set request.body in test.
Reviewed: https:/ /review. openstack. org/453712 /git.openstack. org/cgit/ openstack/ oslo.middleware /commit/ ?id=fed29257358 f990dd91eccd9be 08e4cbcea53dca
Committed: https:/
Submitter: Jenkins
Branch: master
commit fed29257358f990 dd91eccd9be08e4 cbcea53dca
Author: ChangBo Guo(gcb) <email address hidden>
Date: Wed Apr 5 23:12:13 2017 +0800
Fix test_request_ too_large_ no_content_ length failure
Webob >=1.7.0 change its way to check if body is readable [1], content_ length context_ length is None request.body will return returns b''.[3]
The is_body_readable() method returns False now. request.
will be set when set request.body automatically, and if
request.
So just set request.body in test.
[1] https:/ /github. com/Pylons/ webob/commit/ 0e6fcbfbc58af6f dd4e125543bf8f5 fb91b984c6 /github. com/Pylons/ webob/blame/ master/ webob/request. py#L699 /github. com/Pylons/ webob/blame/ master/ webob/request. py#L692
[2] https:/
[3] https:/
Closes-Bug: #1679658
Change-Id: I4e0932dd8664d9 6b2733c5d3b1fa8 46af0c7d132