          response = self.client.get('/raises404/')
          self.assertEqual(response.status_code, 404)
  
      def test_view_exceptions(self):
          for n in range(len(except_args)):
              self.assertRaises(BrokenException, self.client.get,
                  reverse('view_exception', args=(n,)))
 
</s> remove                     sub_tried = e.args[0].get('tried')
 </s> add                     sub_tried = e.tried </s> remove             self.assertTrue('tried' in e.args[0])
            tried = e.args[0]['tried']
            self.assertEqual(len(e.args[0]['tried']), len(url_types_names), 'Wrong number of tried URLs returned.  Expected %s, got %s.' % (len(url_types_names), len(e.args[0]['tried'])))
            for tried, expected in zip(e.args[0]['tried'], url_types_names):
 </s> add             self.assertTrue(hasattr(e, 'tried'))
            tried = e.tried
            self.assertEqual(len(tried), len(url_types_names), 'Wrong number of tried URLs returned.  Expected %s, got %s.' % (len(url_types_names), len(tried)))
            for tried, expected in zip(tried, url_types_names): </s> remove         tried = exception.args[0]['tried']
    except (IndexError, TypeError, KeyError):
 </s> add         tried = exception.tried
        error_url = exception.path
    except AttributeError:
    def test_raised_404(self):
        response = self.client.get('/views/raises404/')
        self.assertContains(response, "<code>not-in-urls</code>, didn't match", status_code=404)

    def test_404_not_in_urls(self):
        response = self.client.get('/not-in-urls')
        self.assertContains(response, "<code>not-in-urls</code>, didn't match", status_code=404)

          response = self.client.get('/raises404/')
          self.assertEqual(response.status_code, 404)
  
    def test_raised_404(self):
        response = self.client.get('/views/raises404/')
        self.assertContains(response, "<code>not-in-urls</code>, didn't match", status_code=404)

    def test_404_not_in_urls(self):
        response = self.client.get('/not-in-urls')
        self.assertContains(response, "<code>not-in-urls</code>, didn't match", status_code=404)

      def test_view_exceptions(self):
          for n in range(len(except_args)):
              self.assertRaises(BrokenException, self.client.get,
                  reverse('view_exception', args=(n,)))
keep keep add keep keep keep keep
 Fixed #18373 - improved handling of Resolver404s from views

When django.core.urlresolvers.resolve was called from a view, failed
and the exception was propagated and rendered by technical_404_response,
the URL mentioned on the page was the current URL instead of the URL
passed to resolve().

Fixed by using the path attribute from the Resolver404 exception instead
of request.path_info. Also cleaned up the exceptions to use standard
named parameters instead of stuffing a dict in args[0] 
tests/view_tests/tests/test_debug.py