summaryrefslogtreecommitdiffstats
path: root/tests/test_wsgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_wsgi.py')
-rw-r--r--tests/test_wsgi.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py
index 8ac594a8..003f7571 100644
--- a/tests/test_wsgi.py
+++ b/tests/test_wsgi.py
@@ -14,8 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import webob
-
from keystone import test
from keystone.common import wsgi
@@ -34,7 +32,7 @@ class BaseWSGITest(test.TestCase):
super(BaseWSGITest, self).setUp()
def _make_request(self, url='/'):
- req = webob.Request.blank(url)
+ req = wsgi.Request.blank(url)
args = {'action': 'index', 'controller': None}
req.environ['wsgiorg.routing_args'] = [None, args]
return req
@@ -134,6 +132,11 @@ class ApplicationTest(BaseWSGITest):
self.assertIn("testkey", app.kwargs)
self.assertEquals("test", app.kwargs["testkey"])
+ def test_render_exception(self):
+ e = exception.Unauthorized(message=u'\u7f51\u7edc')
+ resp = wsgi.render_exception(e)
+ self.assertEqual(resp.status_int, 401)
+
class ExtensionRouterTest(BaseWSGITest):
def test_extensionrouter_local_config(self):