Deprecate meaningless TYPE

As one patch described, Tempest has dropped XML support and the
TYPE becames meaningless. There are still a few TYPE needs to be
deprecated, this patch does this.
Related Change-Id: I85f088700145930fb43e400394dc6c470d5ed867

Change-Id: I8a2e21d6c87a58b0335dbc66bb5a242953dfbd14
This commit is contained in:
guo yunxian 2016-08-01 16:34:43 +08:00
parent f8012dde02
commit a221647416
2 changed files with 6 additions and 4 deletions

View File

@ -26,10 +26,9 @@ documented in a README.rst file in the directory.
API tests are validation tests for the OpenStack API. They should not
use the existing python clients for OpenStack, but should instead use
the tempest implementations of clients. This allows us to test both
XML and JSON. Having raw clients also lets us pass invalid JSON and
XML to the APIs and see the results, something we could not get with
the native clients.
the tempest implementations of clients. Having raw clients let us
pass invalid JSON to the APIs and see the results, something we could
not get with the native clients.
When it makes sense, API testing should be moved closer to the
projects themselves, possibly as functional tests in their unit test

View File

@ -105,6 +105,9 @@ class RestClient(object):
timeout=http_timeout)
def _get_type(self):
if self.TYPE != "json":
self.LOG.warning("Tempest has dropped XML support and the TYPE "
"became meaningless")
return self.TYPE
def get_headers(self, accept_type=None, send_type=None):