glance/glance/tests/unit/common
Ian Cordasco 7a843f7e1f Fix incompatibilities with WebOb 1.7
WebOb 1.7 changed [0] how request bodies are determined to be
readable. Prior to version 1.7, the following is how WebOb
determined if a request body is readable:
  #1 Request method is one of POST, PUT or PATCH
  #2 ``content_length`` length is set
  #3 Special flag ``webob.is_body_readable`` is set

The special flag ``webob.is_body_readable`` was used to signal
WebOb to consider a request body readable despite the content length
not being set. #1 above is how ``chunked`` Transfer Encoding was
supported implicitly in WebOb < 1.7.

Now with WebOb 1.7, a request body is considered readable only if
``content_length`` is set and it's non-zero [1]. So, we are only left
with #2 and #3 now. This drops implicit support for ``chunked``
Transfer Encoding Glance relied on. Hence, to emulate #1, Glance must
set the the special flag upon checking the HTTP methods that may have
bodies. This is precisely what this patch attemps to do.

[0] https://github.com/Pylons/webob/pull/283
[1] https://github.com/Pylons/webob/pull/283/files#diff-706d71e82f473a3b61d95c2c0d833b60R894

Closes-bug: #1657459
Closes-bug: #1657452
Co-Authored-By: Hemanth Makkapati <hemanth.makkapati@rackspace.com>
Change-Id: I19f15165a3d664d5f3a361f29ad7000ba2465a85
2017-03-27 22:03:36 -05:00
..
scripts Remove references of s3 store driver 2016-08-11 12:32:48 -04:00
__init__.py Improve unit tests for glance.common package 2013-05-20 17:31:22 +03:00
test_client.py Port rpc and wsgi to Python 3 2015-10-13 12:27:50 +02:00
test_config.py Fix Python 3 issues in glance.tests.unit.common 2015-08-16 11:39:41 +02:00
test_exception.py Enable python3.5 testing. 2016-12-21 05:55:37 +00:00
test_location_strategy.py Fixing inconsistency in Glance store names. 2016-09-23 16:11:18 +00:00
test_property_utils.py Make properties roles check case-insensitive 2015-06-03 08:30:21 +00:00
test_rpc.py Merge "Extracted HTTP response codes to constants in tests" 2016-10-21 08:54:28 +00:00
test_scripts.py Introduces eventlet executor for Glance Tasks 2014-09-02 11:45:58 -04:00
test_swift_store_utils.py Use ConfigFixture to ensure config settings are reverted 2015-06-16 16:36:07 +00:00
test_timeutils.py Use more specific asserts in unit tests 2016-08-04 21:17:52 +02:00
test_utils.py Use more specific asserts in unit tests 2016-08-04 21:17:52 +02:00
test_wsgi.py Fix incompatibilities with WebOb 1.7 2017-03-27 22:03:36 -05:00