summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common/test_restapi.py
Commit message (Collapse)AuthorAgeFilesLines
* Python 3: the content of a FakeResponse must be bytesCyril Roelandt2014-02-181-0/+3
| | | | | | Encode '_content' if necessary. Change-Id: I25c1e1cd5330f0519bf062be840045d0ef520b28
* FakeResponse: use a default status codeCyril Roelandt2014-02-111-1/+1
| | | | | | | | | | | | | | | When running some tests from test_restapi.py, the following error happens: TypeError: unorderable types: NoneType() < int() In Python 2, comparing NoneType and integers is possible: >>> None < 2 True But in Python 3, it's not allowed. Fix this by using a default status code. Change-Id: Ic0fad5c68f3bf2dd8a2b98423549903f982192c9
* Bring RESTApi closer to ithe imminent keystoneclient.SessionDean Troyer2013-12-031-51/+73
| | | | | | | Prepare to use the (soon to be) common Session from keystoneclient * Rework RESTApi to eventually be a subclass of keystoneclient.Session Change-Id: I68e610f8b19a3f6267a93f7bf3de54a228be68aa
* Create a new base REST API interfaceDean Troyer2013-08-231-0/+320
* restapi module provides basic REST API support * uses dicts rather than Resource classes * JSON serialization/deserialization * log requests in 'curl' format * basic API boilerplate for create/delete/list/set/show verbs * ignore H302 due to urllib import Change-Id: I3cb91e44e631ee19e9f5dea19b6bac5d599d19ce