Commit Graph

77 Commits

Author SHA1 Message Date
Luke Plant 655b29b5ba Fixed #16563 - Error pickling request.user
Thanks to zero.fuxor for the report

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 02:33:14 +00:00
Aymeric Augustin affca1369c Fixed #16632 -- Crash on responses without Content-Type with IE. Thanks juan for the report and kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:58:14 +00:00
Aymeric Augustin 9b1cb755a2 Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 13:01:06 +00:00
Aymeric Augustin 965c5d7cce Fixed #14202 -- made the atom:link element optional in feeds.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-23 15:19:09 +00:00
Aymeric Augustin 22d738c2dc Ensured that the feeds framework supports both datetimes and dates. Refs #4076.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-15 10:16:24 +00:00
Alex Gaynor 8c0eefd066 Convert the remainder of the relative imports in the tests to be absolute imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:34:56 +00:00
Aymeric Augustin f830166167 Fixed #16899 -- Backported the fix for http://bugs.python.org/issue9063 and added a test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:19:48 +00:00
Alex Gaynor 43920cd32e Remove a handful of `import *` from the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 12:53:02 +00:00
Ramiro Morales 3ef1762cb9 Fixed #16924 -- Corrected `date` template filter handling of negative (West of UTC) timezone offsets.
The 'O' format specifier output was incorrect. Thanks mrgriscom and Aymeric Augustin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-25 17:08:31 +00:00
Jannis Leidel e55bbf4c3c Fixed #15237 -- Fixed a typo in specifying UTF-8 encoding in the feed generator and signing tests. Thanks, Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 18:34:33 +00:00
Chris Beaven 0f8f46802a Fixed #15525 -- Custom template tags loading breaks whenever templatetags is a python file
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-28 02:37:16 +00:00
Ramiro Morales 326949e444 Fixed #14503 -- Unified multiple implementations of test cases assert* 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-13 00:42:08 +00:00
Jannis Leidel 3b77458371 Fixed #5025 -- Add a "truncatechars" template filter. Many thanks to Chris Beaven.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-14 13:47:10 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for 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-07-13 09:35:51 +00:00
Jannis Leidel 43cb78fafd Fixed #14506 -- Added an assertion to XViewMiddleware about the dependency on the authentication middleware. Thanks, vanschelven.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-03 17:56:25 +00:00
Jannis Leidel 97f22f2969 Fixed #12375 -- Added a dict() method to convert a MultiValueDict (such as a QueryDict) to a dictionary of key-value pairs. Thanks, oinopion and hvdklauw.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-16 16:34:55 +00:00
Jannis Leidel ce3c281090 Fixed #811 -- Added support for IPv6 to forms and model fields. Many thanks to Erik Romijn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 13:48:24 +00:00
Jannis Leidel 64e19ffb4e Fixed #7704, #14045 and #15495 -- Introduce a lexer for Javascript to fix multiple problems of the translation of Javascript files with xgettext. Many thanks to Ned Batchelder for his contribution of the JsLex library.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 16:11:25 +00:00
Ramiro Morales 2367089392 Tweaked test added in [16308] so it doesn't fail.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 22:09:50 +00:00
Alex Gaynor 60cf3f2f84 Allow SimpleLazyObjects to return None without constantly being reevaluated, also proxy ``__nonzero__``, and do some codecleanup as well.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 15:30:06 +00:00
Jannis Leidel 632dfa2338 Fixed #9200 -- Added new form wizard to formtools based on class based views. Many thanks to Stephan Jäkel, ddurham and ElliottM for their work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 13:47:00 +00:00
Luke Plant a482cc0ba3 Fixed #16004 - csrf_protect does not send cookie if view returns TemplateResponse
The root bug was in decorator_from_middleware, and the fix also corrects
bugs with gzip_page and other decorators.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24 21:28:43 +00:00
Luke Plant e683beb607 Changed utils/decorators.py tests to use RequestFactory
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-23 16:08:45 +00:00
Jannis Leidel fc8116cc4f Fixed #6580 -- Added `default` parameter to `MultiValueDict.getlist` method (the base class for `QueryDict`). Many thanks to mk and andrewebdev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-22 15:05:29 +00:00
Jannis Leidel f60d428463 Fixed #12417 -- Added signing functionality, including signing cookies. Many thanks to Simon, Stephan, Paul and everyone else involved.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-21 14:41:14 +00:00
Luke Plant 23b32c7554 Fixed #15811 - lazy() doesn't take into account methods defined in parents
Thanks to abki for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-05 00:09:51 +00:00
Luke Plant cf11e3789b Fixed #7267 - UnicodeDecodeError in clean_html
Thanks to Nikolay for the report, and gav and aaugustin for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-28 14:08:53 +00:00
Jannis Leidel 0e5d5d6218 Fixed #15662 -- Made sure the module_has_submodule utility function follow correct PEP 302, passing the package as the second argument to the find_module method of the importer. Thanks, Bradley Ayers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:03:18 +00:00
Jannis Leidel f4be8bd53d Fixed #9089 -- Correctly handle list values in MultiValueDict instances when passed to django.utils.http.urlencode. Thanks, kratorius, guettli and obeattie.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:01:41 +00:00
Russell Keith-Magee 3bad2ca473 Fixed #15703 -- Corrected problem in test suite introduced by Python 2.4 changes from r15927. Thanks to mk for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 14:20:15 +00:00
Adrian Holovaty 13864703bc Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Luke Plant 243d0bec19 Fixed #15617 - CSRF referer checking too strict
Thanks to adam for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 20:37:09 +00:00
Russell Keith-Magee afd040d4d3 Updated test assertions that have been deprecated by the move to unittest2. 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-03 15:04:39 +00:00
Jannis Leidel 632d9f994f Fixed #15237 -- Always set charset of Atom1 feeds to UTF-8. Thanks, Simon and jasonkotenko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:14 +00:00
Russell Keith-Magee 56ebab9d85 Fixed #14698 -- Ensure that module_has_sumodule doesn't mistake a cache miss for an existent package. Thanks to Łukasz Rekucki for the report and patch, and to shields for the test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15362 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-30 13:10:47 +00:00
Ramiro Morales 0f783b7f4e Fixed #2986 -- Made the JavaScript code that drives related model instance addition in a popup window handle a model representation containing new lines. Also, moved the escapejs functionality yoo django.utils.html so it can be used from Python code. Thanks andrewwatts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-02 17:34:52 +00:00
Chris Beaven e4b0a8f93c Tests for utils.text.wrap
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-30 21:21:37 +00:00
Alex Gaynor 89219a6829 Fixed a few more cases of the tests not properly restoring sys.path (follow up on [14429]).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:31:19 +00:00
Alex Gaynor c6f90f0053 Fixed MultiValueDict's copy implementation to be consistant with all other copies.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-27 20:39:20 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft 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-10-11 12:55:17 +00:00
Russell Keith-Magee 3754669553 Unified the regressiontests/dateformat tests with the regressiontests/utils/dateformat tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-28 08:19:42 +00:00
Russell Keith-Magee 3610a21a42 Migrated regressiontest/datastructures doctest, and moved it into the existing utils datastructures package. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-28 08:18:39 +00:00
Russell Keith-Magee ec3ba39fdb A few test optimizations; using native unittest where no Django-specific TestCase features are required.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-28 08:18:12 +00:00
Russell Keith-Magee 110c247e8b Added imports for some new unittest modules. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:16:20 +00:00
Russell Keith-Magee 082c5d2ae3 Migrated datastructures utils doctests. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:15:58 +00:00
Russell Keith-Magee 9abfd55a29 Migrated timesince utils doctests. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:15:33 +00:00
Russell Keith-Magee ba53cd30d1 Reorganized utils tests so it's all in separate modules. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:15:04 +00:00
Russell Keith-Magee b4a8c77e7c Migrated datetime_safe doctests. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:14:30 +00:00
Russell Keith-Magee 60e38d29ca Migrated tzinfo doctests. Thanks to Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:14:06 +00:00
Russell Keith-Magee be63b3ca54 Fixed #13698 -- Removed trailing whitespace from regressiontests/utils/timesince. Officially, I'm doing this because trailing whitespace is bad, but apparently it also causes test failures for some people (for reasons we can't narrow down), so there's a double win.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-05 13:07:21 +00:00