diff options
| author | Dolph Mathews <dolph.mathews@gmail.com> | 2013-05-22 14:47:09 -0500 |
|---|---|---|
| committer | Dolph Mathews <dolph.mathews@gmail.com> | 2013-05-22 14:47:09 -0500 |
| commit | 09faddf8768e986b7bc340f986d5375e62d6bc5f (patch) | |
| tree | c65764a719a5f1edfe455923e6966d53e56c7827 | |
| parent | ba7f7d252ec4f6b48c46f26eea4459cda1af0f6b (diff) | |
| download | keystone-09faddf8768e986b7bc340f986d5375e62d6bc5f.tar.gz keystone-09faddf8768e986b7bc340f986d5375e62d6bc5f.tar.xz keystone-09faddf8768e986b7bc340f986d5375e62d6bc5f.zip | |
Test 403 error title
Change-Id: I0e2079e485e6e668186cb477027573d9b0adb161
| -rw-r--r-- | tests/test_exception.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_exception.py b/tests/test_exception.py index dffa14ed..63b9a44e 100644 --- a/tests/test_exception.py +++ b/tests/test_exception.py @@ -75,6 +75,13 @@ class ExceptionTestCase(test.TestCase): self.assertValidJsonRendering(e) self.assertIn(target, str(e)) + def test_403_title(self): + e = exception.Forbidden() + resp = wsgi.render_exception(e) + j = jsonutils.loads(resp.body) + self.assertEqual('Forbidden', e.title) + self.assertEqual('Forbidden', j['error'].get('title')) + class SecurityErrorTestCase(ExceptionTestCase): """Tests whether security-related info is exposed to the API user.""" |
