summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keystone/common/wsgi.py2
-rw-r--r--tests/test_content_types.py12
2 files changed, 13 insertions, 1 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py
index b3de4804..2cc13446 100644
--- a/keystone/common/wsgi.py
+++ b/keystone/common/wsgi.py
@@ -427,7 +427,7 @@ class Router(object):
match = req.environ['wsgiorg.routing_args'][1]
if not match:
return render_exception(
- exception.NotFound(message='The resource could not be found.'))
+ exception.NotFound(_('The resource could not be found.')))
app = match['controller']
return app
diff --git a/tests/test_content_types.py b/tests/test_content_types.py
index ba0cdef9..6b0a03e0 100644
--- a/tests/test_content_types.py
+++ b/tests/test_content_types.py
@@ -308,6 +308,18 @@ class CoreApiTests(object):
self.assertIsNotNone(tenant.get('id'))
self.assertIsNotNone(tenant.get('name'))
+ def test_public_not_found(self):
+ r = self.public_request(
+ path='/%s' % uuid.uuid4().hex,
+ expected_status=404)
+ self.assertValidErrorResponse(r)
+
+ def test_admin_not_found(self):
+ r = self.admin_request(
+ path='/%s' % uuid.uuid4().hex,
+ expected_status=404)
+ self.assertValidErrorResponse(r)
+
def test_public_multiple_choice(self):
r = self.public_request(path='/', expected_status=300)
self.assertValidMultipleChoiceResponse(r)