Permalink
Browse files

don't return a 'request' field from 404 errors

  • Loading branch information...
1 parent cac156d commit 5be8f75cf38b7170aef39cdfc7571d729c5853dd @mapleoin committed Sep 21, 2012
Showing with 2 additions and 4 deletions.
  1. +1 −3 popcorn/test/test_views.py
  2. +1 −1 popcorn/views.py
View
4 popcorn/test/test_views.py
@@ -204,9 +204,7 @@ def test_404_json(self):
response = self.app.get('/notFound',
headers=[('Accept', 'application/json')])
- self.assertEqual(json.loads(response.data), {
- u'request': u'/notFound',
- u'error': u'Not Found'})
+ self.assertEqual(json.loads(response.data), {u'error': u'Not Found'})
self.assertEqual(response.headers['Content-Type'], 'application/json')
self.assertEqual(response.status_code, 404)
View
2 popcorn/views.py
@@ -223,4 +223,4 @@ def faq():
def not_found(error):
"""Handle page not found error"""
error_msg = "Not Found"
- return dict(error=error_msg, status_code=404, request=request.path)
+ return dict(error=error_msg, status_code=404)

0 comments on commit 5be8f75

Please sign in to comment.