summaryrefslogtreecommitdiff
path: root/tests/regressiontests/urlpatterns_reverse/tests.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2013-02-13Fixed #18558 -- Added url property to HttpResponseRedirect*Hiroki Kiyohara
Thanks coolRR for the report.
2012-12-08Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-11-03Fixed #18210 -- Escaped special characters in reverse prefixes.Gabriel Hurley
Ensured that special characters passed in to reverse via the prefix argument are properly escaped so that calls to django.utils.regex_helpers.normalize and/or string formatting operations don't result in exceptions. Thanks to toofishes for the error report.
2012-09-27Fixed #15695 -- Added `ResolverMatch` to the request object.Florian Apolloner
2012-09-07[py3k] Silence many warnings while running the tests.Alex Gaynor
2012-09-01Fixed #17892 -- Do not include whole RegexURLPattern lists in ↵Claude Paroz
RegexURLResolver repr Thanks milosu for the report and the initial patch.
2012-08-14Don't swallow AttributeError in core.urlresolvers.get_callable.Florian Apolloner
2012-08-14[py3] Compared response.content with bytes.Aymeric Augustin
2012-07-21Fixed #6170 -- Ensured that a useful exception is raised when a regex is ↵Julien Phalip
invalid in the URLConf. Thanks to abrahamson.j for the report, to guettli for initial work on the patch, and to David Gouldin for the new patch and test.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-01-03Fixed #17492 -- Allow reversal of named backreferences. Thanks nate_bChris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22Fixed #15900 -- Calls to reverse with nested namespaced urls are escaped ↵Gabriel Hurley
properly and capture parameters as expected. Thanks to teolicy for the report, and dmclain for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-07Fixes #17173 -- Added some extra regression tests for reversing namespaced ↵Chris Beaven
urls with special characters The actual code was already fixed between 1.3.1 and trunk, but more thorough tests are always a good thing. Thanks for the patch, Yann Kaiser. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert the remainder of the relative imports in the tests to be absolute ↵Alex Gaynor
imports. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13Fixed #14503 -- Unified multiple implementations of test cases assert* ↵Ramiro Morales
methods that verify a given exception is raised by a callable throughout the Django test suite. Replaced them with a new assertRaisesMessage method of a new SimpleTestCase, a lightweight subclass of unittest.TestCase. Both are also available for usage in user tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12Fixed #11559 -- Fixed the URL resolver to be able to handle captured ↵Jannis Leidel
parameters in parent URLconfs when also using namespaces. Thanks, cwb, ungenio and hvdklauw. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-16Fixed #10802 -- Handle ImportErrors and AttributeErrors gracefully when ↵Jannis Leidel
raised by the URL resolver system during startup. Many thanks, IonelMaries and Bas Peschier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07Fixed #13154 -- Fixed the URL resolver's reverse() to match the behavior of ↵Jannis Leidel
its resolve() with regard to the default kwargs. Many thanks to patrys. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-29Fixed #5925 -- Added new lazily evaluated version of ↵Jannis Leidel
django.core.urlresolvers.reverse. Thanks, SmileyChris, Preston Timmons and Julien Phalip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27Migrated urlpatterns_reverse doctests. Thanks to Stephan Jaekel.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12Debug 404 page now displays names of URL patterns, if they exist.Malcolm Tredinnick
Thanks to Tobias McNulty for the patch. Fixed #9310. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-14Fixed #5350 -- Added fallback to default 404/500 handlers when they're not ↵Russell Keith-Magee
explicitly specified (or imported) in a urls.py file. Thanks to Thomas Güttler for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Fixed #14027 -- Ensure that reverse() raises an exception when you try to ↵Russell Keith-Magee
reverse None. Thanks to Alex for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06Corrected [13479], accounting for unnamed urls that are instances of classes.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-05Fixed #13922 -- Updated resolve() to support namespaces. Thanks to Nowell ↵Russell Keith-Magee
Strite for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-26Fixed #12594 -- Ensured that a meaningful exception is raised when the ↵Russell Keith-Magee
urlconf_module is None. Thanks to buriy for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Fixed #11960 -- Improved error message for redirects. Thanks, mattmccAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13Fixed #10326: handler500 and handler404 may now be callables. Thanks, ↵Jacob Kaplan-Moss
dcwatson, adurdin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-16Fixed #5034 -- honor request.urlconf in reverse and resolve.Brian Rosner
This enables {% url %} to honor request.urlconf set from process_request middleware methods. Thanks SmileyChris for the initial patch work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16Fixed #10061 -- Added namespacing for named URLs - most importantly, for the ↵Russell Keith-Magee
admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch. This change is backwards incompatible for anyone that is using the named URLs introduced in [9739]. Any usage of the old admin_XXX names need to be modified to use the new namespaced format; in many cases this will be as simple as a search & replace for "admin_" -> "admin:". See the docs for more details on the new URL names, and the namespace resolution strategy. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-29Fixed #10834 -- Added bucket condition to ensure that URL resolvers won't ↵Russell Keith-Magee
ever return None. Thanks to Chris Cahoon for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04Fixed #10065 -- Corrected an error message when an empty urlpattern object ↵Russell Keith-Magee
is provided. Thanks to Matthew Flanagan for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-21Fixed #10194: added `django.shortcuts.redirect`, a do-what-I-mean redirect ↵Jacob Kaplan-Moss
shortcut. See the docs at topics/http/shortcuts for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-10In urlconfs, include() may now be used on an iterable of patterns instead of ↵Jacob Kaplan-Moss
just a module string. Refs #6470 -- making the admin use a urlconf is much easier with this work done. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-30Fixed another case of reverse URL resolving that wasn't working.Malcolm Tredinnick
This is a similar situation to that fixed in r9087. We weren't merging multiple levels of include() calls together correctly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-27Fixed #9038 -- Correctly handle URL patterns with the same name (or view name),Malcolm Tredinnick
declared independently and that differ only by argument signatures. Patch from Russell Keith-Magee. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed a case of incorrect parsing of quanitifers in reg-exp patterns.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31Fixed #8725 -- Handle empty URL patterns in reverse().Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31A rewrite of the reverse URL parsing: the reverse() call and the "url" ↵Malcolm Tredinnick
template tag. This is fully backwards compatible, but it fixes a bunch of little bugs. Thanks to SmileyChris and Ilya Semenov for some early patches in this area that were incorporated into this change. Fixed #2977, #4915, #6934, #7206. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06Revert [7849] and [7850]. Brain failure on my part.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06Some tests for the new features. These pretty much fail at the moment. Based onMalcolm Tredinnick
SmileyChris's original work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16Fixed #6831 -- Reverse URL resolver now replaces backslashes correctly. ↵Adrian Holovaty
Thanks, Bastian Kleineidam git-svn-id: http://code.djangoproject.com/svn/django/trunk@7660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27Refs #2333 - Modified runtests script to use new testing framework. Migrated ↵Russell Keith-Magee
existing tests to use Django testing framework. All the 'othertests' have been migrated into 'regressiontests', and converted into doctests/unittests, as appropriate. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3661 bcc190cf-cafb-0310-a4f2-bffc1f526a37