summaryrefslogtreecommitdiff
path: root/tests/regressiontests/views
AgeCommit message (Collapse)Author
2011-04-02Refactored views regression tests to isolate generic views from the root URL ↵Russell Keith-Magee
space. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Updates to the test suite to allow for newly deprecated and removed featuresRussell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15990 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
2011-03-02Fixed #15531 -- Partially reverted [15701] due to compatibility issues with ↵Jannis Leidel
middlewares that modify content of responses. Thanks for the report, schinckel. Refs #15281. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01Fixed #15281 -- Made the static view use an iterator when serving a file, ↵Jannis Leidel
effectively making this less of a memory hog. Also use the appropriate attributes of the stat object instead of indexes. Thanks for the initial patch, FunkyBob and aaugustin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01Fixed #717 - If-Modified-Since handling should compare dates according to ↵Luke Plant
RFC 2616 Thanks to Maniac for the report, julienb for the initial patch, and especially to aaugustin for the final patch and tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16Fix the test isolation from [15552].Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16Fixed #15314 -- Added tests for the static URL pattern function added in ↵Jannis Leidel
r15530 and made sure the **kwargs are passed to the view correctly. Thanks for the report and initial patch, Bruno Renié. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-07Fixed #5494, #10765, #14924 -- Modified the order in which translations are ↵Ramiro Morales
read when composing the final translation to offer at runtime. This is slightly backward-incompatible (could result in changed final translations for literals appearing multiple times in different .po files but with different translations). Translations are now read in the following order (from lower to higher priority): For the 'django' gettext domain: * Django translations * INSTALLED_APPS apps translations (with the ones listed first having higher priority) * settings/project path translations (deprecated, see below) * LOCALE_PATHS translations (with the ones listed first having higher priority) For the 'djangojs' gettext domain: * Python modules whose names are passed to the javascript_catalog view * LOCALE_PATHS translations (with the ones listed first having higher priority, previously they weren't included) Also, automatic loading of translations from the 'locale' subdir of the settings/project path is now deprecated. Thanks to vanschelven, vbmendes and an anonymous user for reporting issues, to vanschelven, Claude Paroz and an anonymous contributor for their initial work on fixes and to Jannis Leidel and Claude for review and discussion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01Modified the test case from r15383 to avoid an output inconsistency with ↵Russell Keith-Magee
KeyError. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01Fixed #14972 -- Ensure that the HTML email logger always produces useful ↵Russell Keith-Magee
output, regardless of whether it has been given an exception or a request. Thanks to jamstooks for the report, and bpeschier for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-20Fixed #15122 -- Restored reporting of the template files tried in the ↵Ramiro Morales
texmplate loader post mortem section of the TemplateDoesNotExit 500 error debug page. Thanks rdrey for reporting this regression. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13Fixed #15025 - template debug fails if there's a callable local var that ↵Luke Plant
generates an exception Thanks to Tai Lee for the patch and report, also to Don Spaulding. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-05Fixed #15010 -- Added current_app parameter to close gap between ↵Jannis Leidel
TemplateResponse and render method. Thanks, acdha. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22Fixed #14936 -- Tweaked the new render shortcut to reflect non-legacy ↵Russell Keith-Magee
arguments. Thanks to adamv for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21Fixed #12816 -- Added a render() shortcut.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-13Fixed #13726 -- Further refine changes made in r12384 and r13069 for using ↵Jannis Leidel
non-English source languages in JavaScript translation catalogues. Thanks, Ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-07Fixed #12815 -- Added TemplateResponse, a lazy-evaluated Response class. ↵Russell Keith-Magee
Thanks to Simon Willison for the original idea, and to Mikhail Korobov and Ivan Sagalaev for their assistance, including the draft patch from Mikhail. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04Removed all usages of deprecated TestCase methods (self.fail*). This ↵Alex Gaynor
removed most of the Warnings emitted (with -Wall) during the test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-30Fixed #14812 -- Made parsing of the If-Modified-Since HTTP header more ↵Ramiro Morales
robust in presence of malformed values when serving static content. Thanks shaohua for the report, and alexey.smolsky@gmail.com for a similar report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04Fixed #9988 -- Added support for translation contexts. Thanks, Claude Paroz.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28Fixed #14565 - No csrf_token on 404 page.Luke Plant
This solution doesn't have the negative side-effects of [14356]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21Fixed #14507 -- Corrected the logic of the URL helpers and view of ↵Jannis Leidel
staticfiles to actual work like documented (only when settings.DEBUG is True). Thanks for the report and initial patch, mbi. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-01Fixed #13897 -- Added tests for pagination feature of the generic ↵Jannis Leidel
object_list view. Thanks, d0ugal and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-26Fixed #12544 and #13600 -- Fixed static files serving view to catch invalid ↵Jannis Leidel
date from If-Modified-Since header. Thanks akaihola and SmileyChris for patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-26Fixed #7535 -- Correctly set Content-Encoding header in static files serving ↵Jannis Leidel
view. Thanks for the report and patch, Kevin Hunter. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11Add option to redirect_to view to allow passing along the query stringMalcolm Tredinnick
from the original request. Default is current behaviour, which is not to pass the query string (it often won't be appropriate to do so). Thanks to steingrd@ifi.uio.no for the patch and tests. Fixed #9966. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-13Fixed #13514 -- Corrected the process of loading multiple javascript ↵Russell Keith-Magee
translation catalogs. Thanks to jtiai for the report, to Ramiro Morales for working out the test case, and to Ramiro and Jannis for their help on the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-22Fixed #12764: Avoid exceeding psycopg1 limits in the views tests.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-12Fixed #11891 -- Ensured that attributes of get_absolute_url are preserved ↵Russell Keith-Magee
through the metaclass. Thanks to nfg for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08Add files mistakenly left out of r12725.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08Fixed #11461: Ensured complete traceback is available on the debug page when ↵Karen Tracey
an exception is encountered during template rendering, even when running on Python 2.6 or higher. Thanks Glenn. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-08Move the tests added for #12302 to where some other tests for debug page ↵Karen Tracey
responses already existed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-05Fixed #12083: Ensured generating debug 404 page won't raise a key error. ↵Karen Tracey
Thanks pigletto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-02Fixed #11522: Restored ability of http redirect responses to correctly ↵Karen Tracey
handle redirect locations with non-ASCII chars. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-16Fixed #11384 - Make sure translations in the project directory really ↵Jannis Leidel
override translations in apps as specified in the docs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-05Fixed #3594 - Added ability to discard the language catalog in the ↵Jannis Leidel
JavaScript i18n view in case the selected language is English but no English translation catalog actual exists, e.g. due to being the language translated from. Thanks to msaelices, aryx and Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Fixed: 3274: Added date_list context variable to the archive_month generic ↵Karen Tracey
view, consistent with archive_index and archive_year. Thanks Sean Brant. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05Merged soc2009/model-validation to trunk. Thanks, Honza!Joseph Kocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-30Fixed #12448 - Make sure format strings are handled correctly as unicode.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-19Fixed #10927 - Content Types shortcut view throws 500s instead of 404sLuke Plant
Thanks to Jeremy Dunck/Alex Gaynor for the patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@11917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-01Fixed #12125 -- Fixed a typo in the generic views date_based test that ↵Karen Tracey
caused it to fail in November. Thanks brutasse. --This line and those below, will be ignored-- M tests/regressiontests/views/tests/generic/date_based.py git-svn-id: http://code.djangoproject.com/svn/django/trunk@11697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-13Fixed #10458 -- Corrected the `next_month` and `previous_month` context ↵Russell Keith-Magee
variables provided with the generic month_archive view. The value returned now matches the docstring and the generic views documentation. Thanks to fperetti for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12Fixed #10267 -- Correctly handle IRIs in HttpResponse.build_absolute_uri().Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-09Fixed #7944: date-based generic views no longer get confused with a numeric ↵Jacob Kaplan-Moss
month format. Thanks to Justin Lilly and Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Fixed #7529: added a FILES section to the debug view. As a bonus, we've now gotJacob Kaplan-Moss
the start of a suite of tests for the debug views. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Fixed #7602 -- Corrected lookup keyword arguments in archive_month and ↵Brian Rosner
archive_week to properly range when date_field is from DateField. Thanks nullie for the original patch and Colin Grady for the test coverage. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22Fixed #8366: Modified a test fixture to remove an unnecessary forward ↵Russell Keith-Magee
reference. Thanks to Ramiro Morales for the suggestion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Fixed #7741: django.newforms is now django.forms. This is obviously a ↵Jacob Kaplan-Moss
backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18Fixed #3639: updated generic create_update views to use newforms. This is a ↵Jacob Kaplan-Moss
backwards-incompatible change. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7952 bcc190cf-cafb-0310-a4f2-bffc1f526a37