1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #15695 -- Added ResolverMatch to the request object.

This commit is contained in:
Florian Apolloner
2012-09-27 15:06:58 +02:00
parent 44767f2caf
commit b946db5241
6 changed files with 29 additions and 3 deletions

View File

@@ -512,6 +512,11 @@ class ResolverMatchTests(TestCase):
self.assertEqual(match[1], args)
self.assertEqual(match[2], kwargs)
def test_resolver_match_on_request(self):
response = self.client.get('/resolver_match/')
resolver_match = response.resolver_match
self.assertEqual(resolver_match.url_name, 'test-resolver-match')
class ErroneousViewTests(TestCase):
urls = 'regressiontests.urlpatterns_reverse.erroneous_urls'