summaryrefslogtreecommitdiff
path: root/tests/test_http.py
Commit message (Collapse)AuthorAgeFilesLines
* Restore client.py for backward compatibilityJamie Lennox2013-08-211-0/+13
| | | | | | | | | Simply pull in HTTPClient from its new location. This also restores the tests that were modified back to there original form to make sure nothing has changed from the original. Fixes: bug 1211998 Change-Id: Ia3241a4352eb6b37c6489cd4dd1bc373de107e12
* Extract basic request callJamie Lennox2013-08-121-3/+98
| | | | | | | | Create a function out of the standard request call that handles common headers like user agent and logging. This makes future changes easier to digest. Change-Id: Ia25f997df64efdce27c8fb815e544922940145c3
* Rename client.py to httpclient.pyJamie Lennox2013-08-101-6/+6
| | | | | | | | | | | | | The discoverable entry point is to be client.Client however adding this functionality to the current client.py is impossible as we end up with circular dependencies. This patch simply renames the current client.py to httpclient.py to make future patches that will modify client.py more readable. Required for: blueprint api-version-discovery Change-Id: Ibcea03f6e1df0ae05329297166a8b8117fc3ce7b
* Pass json object when invoking exception handler.Lin Hua Cheng2013-04-171-1/+26
| | | | | | Fixes bug 1154753. Change-Id: I6ca7c758d42e8586c8adf2529ce5362108a57a56
* Use requests module for HTTP/HTTPSDean Troyer2012-12-181-17/+28
| | | | | | | | | | | | | * Implement correct certificate verification * Add requests to tools/pip-requires * Fix OS_CACERT env var help text * Add info to README * Rework tests to use requests Pinned requests module to < 1.0 as 1.0.2 is now current in pipi as of 17Dec2012. Change-Id: I120d2c12d6f20ebe2fd7182ec8988cc73f623b80
* removing repeat attempt at authorization in clientJoe Heck2012-11-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | blueprint solidify-python-api * extended and updated documentation strings * updated README.rst with latest options * made debug a pass-through value, optionally set on client (instead of just being pulled from environment variable) * adding AccessInfo object and associated tests (access.AccessInfo meant to be a cacheable object external to client and ultimately to replace service_catalog and it's existing functionality) * extending authtoken to support lists of endpoints * maintaining a single entity for client.management_url with first from list of possible endpoints * create project_name and project_id synonyms to match tenant_name and tenant_id * replacing authenticate call to a pure method, not overloading the resource/manager path that confuses base URL concepts. * throw AuthorizationFailure if client attempts to access keystone resources before it has a management url * special case listing tenant using auth_url for unscoped tokens authorized through client * special case listing tokens.authenticate for Dashboard to allow unscoped tokens to hand back parity information to dashboard Change-Id: I4bb3a1b6a5ce2c4b3fbcebeb59116286cac8b2e3
* add a new HTTPClient attr for setting the original IPIonuț Arțăriși2012-10-221-0/+14
| | | | | | | | | | The original IP is useful in cases where keystoneclient is used by a different openstack component and we need to know who made the original request. Otherwise it gets overwritten by e.g. Dashboard's host's IP. bug 1046837 Change-Id: Ic22c565e92010afd89c8573c375919215b70d73d
* use mock context managers instead of decorators+functionsIonuț Arțăriși2012-10-181-20/+11
| | | | Change-Id: I761ee19169b39e47c4aa191b553965446432dba9
* decoding json only on 2xx success responseJoe Heck2012-06-261-0/+15
| | | | | | bug 1007661 Change-Id: I9090c78bb9a19ae46d865fca80af0b3bf4257dc6
* pep8 1.1 changes and updatesJoe Heck2012-06-011-2/+1
| | | | Change-Id: I8bc3582bb3f35a3d841bb1e8c03b62ba61ff92d7
* Removed ?fresh=nonsense (bug 936405)Dolph Mathews2012-03-071-2/+1
| | | | Change-Id: I69f7411967ef23348854c206efc79a3cf7d3755d
* finish removing project_idJesse Andrews2011-12-191-2/+2
|
* remove X-Auth-Project-Id, re-add auth by token support (most tests pass)Jesse Andrews2011-12-181-2/+0
|
* more pep8 cleanupJoe Heck2011-11-101-3/+2
|
* Initial commit.Gabriel Hurley2011-10-251-0/+63