From 91afc00513bd2fa6302ea2be35e1f842cbd5fd38 Mon Sep 17 00:00:00 2001 From: Kevin Christopher Henry Date: Thu, 3 Oct 2013 03:20:04 -0400 Subject: Fixed #21157 -- Fixed problems with ResolverMatch - Fixed bug in get_callable() that caused resolve() to put a string in ResolverMatch.func. - Made ResolverMatch.url_name match the actual url name (or None). - Updated tests that used the string value in ResolverMatch.func, and added regression tests for this bug. - Corrected test urls whose dummy view paths caused failures (behavior that was previously masked by this bug). --- tests/model_permalink/urls.py | 2 +- tests/model_permalink/views.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 tests/model_permalink/views.py (limited to 'tests/model_permalink') diff --git a/tests/model_permalink/urls.py b/tests/model_permalink/urls.py index cbe50288b8..8ad8a16d05 100644 --- a/tests/model_permalink/urls.py +++ b/tests/model_permalink/urls.py @@ -1,5 +1,5 @@ from django.conf.urls import url urlpatterns = [ - url(r'^guitarists/(\w{1,50})/$', 'unimplemented_view_placeholder', name='guitarist_detail'), + url(r'^guitarists/(\w{1,50})/$', 'model_permalink.views.empty_view', name='guitarist_detail'), ] diff --git a/tests/model_permalink/views.py b/tests/model_permalink/views.py new file mode 100755 index 0000000000..c1ee23e893 --- /dev/null +++ b/tests/model_permalink/views.py @@ -0,0 +1,5 @@ +from django.http import HttpResponse + + +def empty_view(request, *args, **kwargs): + return HttpResponse('') -- cgit v1.3