Commit Graph

2052 Commits

Author SHA1 Message Date
Jannis Leidel d931f43b70 Fixed #14126 -- Fixed an issue with changes to the blocktrans tag introduced in r13967 related to multiple plural forms. Thanks, mark0978, svetlyak40wt and Ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-16 20:40:17 +00:00
Alex Gaynor 7408f5098b Converted or_lookups tests from doctests to unittests. We have always been at war with doctests. Thanks to Paul Tax for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-16 17:00:11 +00:00
Alex Gaynor c20f2f2ac9 Fixed #14473 -- converted the model_package tests from doctests to unitests. We have always been at war with doctests. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 07:34:23 +00:00
Alex Gaynor 056659c1cf Fixed #14472 -- converted generic_relations tests from doctests to unitests. We have always been at war with doctests. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 06:52:35 +00:00
Alex Gaynor 5a8e40a03f Fixed #11350 -- added an Israeli localflavor. Thanks to Yuval and Idan Gazit for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 02:58:10 +00:00
Alex Gaynor 2e8bc8f986 Fixed #14454 -- converted admin_widgets tests from doctests to unittests. We have always been at war with doctests. Thanks to prestontimmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 02:35:51 +00:00
Luke Plant 45c7f427ce Fixed #14445 - Use HMAC and constant-time comparison functions where needed.
All adhoc MAC applications have been updated to use HMAC, using SHA1 to
generate unique keys for each application based on the SECRET_KEY, which is
common practice for this situation. In all cases, backwards compatibility
with existing hashes has been maintained, aiming to phase this out as per
the normal deprecation process. In this way, under most normal
circumstances the old hashes will have expired (e.g. by session expiration
etc.) before they become invalid.

In the case of the messages framework and the cookie backend, which was
already using HMAC, there is the possibility of a backwards incompatibility
if the SECRET_KEY is shorter than the default 50 bytes, but the low
likelihood and low impact meant compatibility code was not worth it.

All known instances where tokens/hashes were compared using simple string
equality, which could potentially open timing based attacks, have also been
fixed using a constant-time comparison function.

There are no known practical attacks against the existing implementations,
so these security improvements will not be backported.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 20:54:30 +00:00
Jannis Leidel 36f2f7ee7c Fixed #14301 -- Handle email validation gracefully with email addresses containing non-ASCII characters. Thanks, Andi Albrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 18:37:05 +00:00
Alex Gaynor 8d364763ed Fixed #14456 -- converted inline_formsets tests from doctests to unittests. We have always been at war with doctests. Thanks to prestontimmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 01:40:20 +00:00
Alex Gaynor 1ac4c101ae Fixed #14459 -- converted many_to_one_regress tests from doctests to unittests. We have always been at war with doctests. Patch from Gabriel Hurley.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 01:24:34 +00:00
Alex Gaynor 52efbf9715 Fixed #14460 -- converted managers_regress tests from doctests to unittests. We have always been at war with doctests. Patch from Gabriel Hurley.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 01:17:14 +00:00
Alex Gaynor 2bbea7555b Fixed #14458 -- converted m2m_regress tests from doctests to unittests. We have always been at war with doctests. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 01:10:57 +00:00
Ramiro Morales 08d14925c9 Fixed #12192 -- Don't execute any DB query when the QS slicing being performed
will result in use of LIMIT 0. Thanks Suor for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 23:36:16 +00:00
Honza Král 00a685178a Fixed #14119 -- fields_for_model no longer returns all fields when fields parameter is the empty tuple. Thanks alexdutton!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 04:46:33 +00:00
Honza Král 52716ddd1b Fixed #12304 -- regression tests to make sure the validation messages for unique violations are sane, Thanks ramiro!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 04:36:51 +00:00
Honza Král 67f9663f52 Fixed #13811 -- Changed unique validation in model formsets to ignore None values, not just omit them
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-13 00:30:02 +00:00
Russell Keith-Magee eec45e8b71 Fixed #9002 -- Added a RequestFactory. This allows you to create request instances so you can unit test views as standalone functions. Thanks to Simon Willison for the suggestion and snippet on which this patch was originally based.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 23:37:47 +00:00
Russell Keith-Magee c7384af061 Modified the test_client tests to use the non-deprecated mail API.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 14:06:11 +00:00
Alex Gaynor 5506653b77 Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 03:33:19 +00:00
Alex Gaynor ceef628c19 Converted model_inheritance_select_related tests from doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 02:09:13 +00:00
Alex Gaynor 977d588dc2 Converted initial_sql_regress tests from doctests (sort of...) to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 01:59:28 +00:00
Alex Gaynor 2d03070786 Converted get_or_create_regress tests from doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 01:54:19 +00:00
Russell Keith-Magee 9079ecf4d6 Tweak to many_to_one_null doctest to avoid primary key assumptions (causing breakage on PostgreSQL).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 00:56:40 +00:00
Russell Keith-Magee 77ec3ce0c4 Migrated one_to_one doctests. Thanks to George Sakkis for the patch. (We have always been at war with doctests)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 00:56:19 +00:00
Russell Keith-Magee 0ef3e86eef Migrated many_to_one_null doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 00:55:55 +00:00
Russell Keith-Magee c830dbe39f Migrated properties doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 00:55:31 +00:00
Russell Keith-Magee cdfbe79674 Migrated the mutually_referential doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 00:55:05 +00:00
Russell Keith-Magee 539af4deec Migrated m2o_recursive and m2o_recursive2 tests, merging them into a single package. Thanks to George Sakkis for the patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12 00:14:49 +00:00
Jannis Leidel 6ddfe26932 Fixed #14349 -- Added Belgium localflavor. Thanks for the report and patch, Laurent Luce.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 23:35:23 +00:00
Jannis Leidel d739737015 Fixed #13494 -- Correctly concat an email subject prefix with a translation string. Thanks, hcarvalhoalves and Andi Albrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 22:27:45 +00:00
Alex Gaynor 103a201449 Fixed #14444 -- Convert the pagination doctests to unittests. We have always been at war with doctests. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 20:38:12 +00:00
Alex Gaynor 39595a9e0e Converted ordering tests from doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 18:17:37 +00:00
Alex Gaynor 3879c59074 Converted save_delete_hooks tests from doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 17:41:44 +00:00
Jacob Kaplan-Moss e01bce1bfb Fixed #14440 - Converted mail doctests to unittests.
Thanks to Rob Hudson for the patch and also to andialbrecht who filed a
similar patch that I didn't use.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 15:11:55 +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 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Ramiro Morales b79daef867 Consolidated i18n commands test with the rest of the i18n tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 22:19:01 +00:00
Alex Gaynor 20fa9ddb71 Converted signals tests from doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 18:23:39 +00:00
Ramiro Morales b12c739143 Fixed #6073 -- Made compilemessages 18n management command reject PO files with BOM.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 16:38:28 +00:00
Carl Meyer 2f17dd3dd0 Refs #11256 -- Extended the annotation field name conflict check to cover m2ms and reverse related descriptors as well. This is needed to actually cover the case raised by #14373.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 08:04:14 +00:00
Carl Meyer 501546df6f Fixed #12226 -- Deprecated test client Response.template attribute in favor of templates attribute, which is always a list. Thanks Russell for patch review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 02:16:33 +00:00
Ramiro Morales d084439c41 Fixed #12650 -- Don't generate invalid XHTML in the admin, databrowse apps when
the i18n context processor is active. Thanks to Rob Hudson for the report and
fix suggestion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-10 01:57:56 +00:00
Alex Gaynor 41551a0274 Fixed a typo in the comments tests, as well as a dependency on CPython's reference counting semantics.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 23:04:49 +00:00
Alex Gaynor 16089ba135 Converted defer_regress tests from doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 21:55:15 +00:00
Carl Meyer 1fe1af93a5 Added sanity-checking of annotation alias names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 20:07:48 +00:00
Alex Gaynor 3234c7a123 Fixed #14011 -- Doing a subquery with __in and an EmptyQuerySet no longer raises an Exception. This is actually just a test for this, it was fixed by [14084]. Thanks to skatei for the report and mk for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 16:51:34 +00:00
Alex Gaynor 560fedde4c Fixed #14366 -- Model.objects.none().values() now correctly returns a QuerySet with no items, rather than raising an Exception. Thanks to Carl Meyer for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 16:45:58 +00:00
Alex Gaynor 2314fadabe Convert m2m_recursive tests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14082 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 16:26:48 +00:00
Russell Keith-Magee 18c3ea5546 Fixed #14427 -- Added --bisect and --pair flags to runtests.py, making it easier to find pairs of tests that fail when run together.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 14:44:54 +00:00
Russell Keith-Magee a904e55859 Fixed #11509 -- Modified usage of "Web" to match our style guide in various documentation, comments and code. Thanks to timo and Simon Meers for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 08:12:50 +00:00