keystoneclient inconsistently mocks httplib2 content-type/body handling
Bug #1050091 reported by
Dolph Mathews
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-keystoneclient |
Fix Released
|
Medium
|
Joseph Heck |
Bug Description
Keystone client tests extensively mock httplib2.
- Some status codes for empty response bodies are mocked as 200's instead of 204's
- Some "empty" response bodies are mocked as empty JSON objects, instead of simply empty bodies
- Some response bodies are asserted to be the python null value (None), which I don't think httplib2 would ever return
- Valid "Content-Type: application/json" headers are sometimes mocked along with what should be empty request bodies (and therefore invalid as JSON)
no longer affects: | keystone |
Changed in python-keystoneclient: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in python-keystoneclient: | |
milestone: | none → 0.2.0 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/12909 github. com/openstack/ python- keystoneclient/ commit/ 59917278d7a2e37 60d6229f874b2a9 53bf2b28cc
Committed: http://
Submitter: Jenkins
Branch: master
commit 59917278d7a2e37 60d6229f874b2a9 53bf2b28cc
Author: Dolph Mathews <email address hidden>
Date: Wed Sep 12 17:34:09 2012 -0500
Fixed httplib2 mocking (bug 1050091, bug 1050097)
- 204 No Content should be mocked with empty response bodies
- Content-Type headers should not be mocked with empty response bodies
- httplib2 would never return None as a response body
- The Identity API never expects a req/resp body with a string value of "null"
Change-Id: Ie22e8e52885732 68165ed06049978 195955f8ca6