diff options
author | Guang Yee <guang.yee@hp.com> | 2013-01-08 08:46:20 -0800 |
---|---|---|
committer | Guang Yee <guang.yee@hp.com> | 2013-02-20 13:18:38 -0800 |
commit | 9f812939d4b05384b0a7d48e6b916baeca0477dc (patch) | |
tree | dda2e10abea730ab99955b3d595e60735b273a1f /tests/test_content_types.py | |
parent | d036db145d51f8b134ffa36165065a8986e4f8a1 (diff) | |
download | keystone-9f812939d4b05384b0a7d48e6b916baeca0477dc.tar.gz keystone-9f812939d4b05384b0a7d48e6b916baeca0477dc.tar.xz keystone-9f812939d4b05384b0a7d48e6b916baeca0477dc.zip |
v3 token API
Also implemented the following:
blueprint pluggable-identity-authentication-handlers
blueprint stop-ids-in-uris
blueprint multi-factor-authn (just the plumbing)
What's missing?
* domain scoping (will be implemented by Henry?)
Change-Id: I191c0b2cb3367b2a5f8a2dc674c284bb13ea97e3
Diffstat (limited to 'tests/test_content_types.py')
-rw-r--r-- | tests/test_content_types.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_content_types.py b/tests/test_content_types.py index 975f8128..183974fd 100644 --- a/tests/test_content_types.py +++ b/tests/test_content_types.py @@ -73,7 +73,7 @@ class RestfulTestCase(test.TestCase): self.metadata_foobar = self.identity_api.update_metadata( self.user_foo['id'], self.tenant_bar['id'], - dict(roles=['keystone_admin'], is_admin='1')) + dict(roles=[self.role_admin['id']], is_admin='1')) def tearDown(self): """Kill running servers and release references to avoid leaks.""" @@ -180,7 +180,8 @@ class RestfulTestCase(test.TestCase): elif self.content_type == 'xml': response.body = etree.fromstring(response.body) - def restful_request(self, headers=None, body=None, token=None, **kwargs): + def restful_request(self, method='GET', headers=None, body=None, + token=None, **kwargs): """Serializes/deserializes json/xml as request/response body. .. WARNING:: @@ -198,12 +199,13 @@ class RestfulTestCase(test.TestCase): body = self._to_content_type(body, headers) # Perform the HTTP request/response - response = self.request(headers=headers, body=body, **kwargs) + response = self.request(method=method, headers=headers, body=body, + **kwargs) self._from_content_type(response) # we can save some code & improve coverage by always doing this - if response.status >= 400: + if method != 'HEAD' and response.status >= 400: self.assertValidErrorResponse(response) # Contains the decoded response.body |