Commit Graph

1559 Commits

Author SHA1 Message Date
Russell Keith-Magee 35dc7d6033 Migrated model_inheritance_regress doctests. Thanks to Gregor Müllegger for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 15:14:04 +00:00
Russell Keith-Magee 8bafde1229 Migrated forms (minus localflavor) doctests. A huge thanks to Daniel Lindsley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 13:20:56 +00:00
Alex Gaynor 8da8d6c586 Added a test for using an `__in` lookup with a ValueListQueryset from a none() call. Refs #14622.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 02:33:51 +00:00
Jannis Leidel 9b7be918ed Fixed #12325 -- Allows zero values for moderate_after and close_after fields of comment moderators. Thanks, Gabriel Hurley.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-13 18:42:56 +00:00
Jannis Leidel 109f42a981 Fixed #14670 -- Made GenericTabularInline aware of changes made in r13708. Thanks, gregmuellegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-13 18:42:31 +00:00
Ian Kelly 8a7a44ffa2 Fixed a test case that was failing in Oracle due to conflation of null and empty strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 19:26:57 +00:00
Ian Kelly 9892f4c5d5 Fixed a multiple_database test case that was failing in Oracle due to forced table name capitalization. The test case now matches the style used by the raw_query tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 18:48:39 +00:00
Ian Kelly 87a8046f90 Made the oracle backend throw the same ValueError as the mysql backend when a timezone-aware datetime is passed in. This fixes a datatypes test failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 18:39:30 +00:00
Ian Kelly ee6bec6c09 Fixed #11101: Rewrote the sequence reset SQL for Oracle to prevent it from performing an implicit commit that caused all fixtures to be automatically committed, causing a large number of test failures.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 01:44:22 +00:00
Alex Gaynor 590bde8835 Changed a test to be less specific about the exception string it expected. Test suite now passes 100% on PyPy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14536 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 23:03:53 +00:00
Luke Plant 02fc6276d7 Fixed #14508 - test suite silences warnings.
Utility functions get_warnings_state and save_warnings_state have been added
to django.test.utils, and methods to django.test.TestCase for convenience.

The implementation is based on the catch_warnings context manager from
Python 2.6.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 15:06:20 +00:00
Carl Meyer 616b30227d Fixed #7539, #13067 -- Added on_delete argument to ForeignKey to control cascade behavior. Also refactored deletion for efficiency and code clarity. Many thanks to Johannes Dollinger and Michael Glassford for extensive work on the patch, and to Alex Gaynor, Russell Keith-Magee, and Jacob Kaplan-Moss for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-09 16:46:42 +00:00
Alex Gaynor 96cc7baf0c Fixed #13684 -- if settings.ROOT_URLCONF isn't defined don't blow up with an UnboundLocalError.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-07 16:02:22 +00:00
Alex Gaynor 035cb99b47 Make the requests test use unittest2, rather than the system unittest.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-07 15:41:17 +00:00
Alex Gaynor abaa3ed4bd Fixed #13935, added support for using QuerySet.dates across related fields. Thanks to valyagolev for his work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 16:03:05 +00:00
Jannis Leidel 127506aeac Fixed #11966 -- Made it possible to use a percent sign in a translation message id. Thanks for the patch, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 14:06:24 +00:00
Jannis Leidel efc5384a32 Fixed #6476 -- Added option to makemessages management command to disable wrapping of long lines. Thanks to pytechd for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 12:08:37 +00:00
Jannis Leidel 83aeb3c768 Fixed #9988 -- Added support for translation contexts. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 10:48:27 +00:00
Alex Gaynor 0659391baf Converted templates doctests into unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 04:47:05 +00:00
Russell Keith-Magee a89e02637b Fixed #13567 -- Added a 'silent' argument to the cycle tag, so that you can declare a cycle without producing a value in the template. Thanks to anentropic for the suggestion and initial patch, and Łukasz Rekucki for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 13:42:30 +00:00
Russell Keith-Magee 1fc7c4aee4 Fixed #14596 -- Light refactoring of the cache backends.
* Removes some code duplication,
 * Provides a convenient base class for db-like cache backends
 * Adds tests for an edge case of culling,
 * Marks the memcached tests as "skipped", rather than omitting them.

Thanks to Jonas H for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:55:08 +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 7dfefa74ca Properly handle the fact that lists are mutable when trying to maintain state in a test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:27:24 +00:00
Russell Keith-Magee 909c44e1aa Migrated app_loading doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:21:48 +00:00
Russell Keith-Magee c10d41c821 Fixed #14470 -- Migrated modeladmin doctests. Thanks to Preston Timmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:09:16 +00:00
Russell Keith-Magee 3d96540b80 Added a filter to silence the RuntimeWarning in the Indonesian localflavor tests. Thanks to Alex for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 23:46:37 +00:00
Alex Gaynor 6824c9b796 Ensure that assertNumQueries doesn't swallow exceptions inside the function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 08:29:07 +00:00
Alex Gaynor aa951eb8ea Ensure that the staticfiles tests use the MEDIA_ROOT they intended, also use a more approrpiate datastructure in collectstatic.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 23:39:53 +00:00
Russell Keith-Magee 03b12ae2cf Rewrote a test assertion so that it doesn't fail under Python 2.7. Thanks to Florian Apolloner for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 13:04:02 +00:00
Russell Keith-Magee 52e0bcbc62 Fixed #14588 -- Corrected r14393 to ensure that response middlewares are are always applied. Includes a battery of tests to validate the expected behavior of the middleware cycle. Thanks to Petr Marhoun for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 07:19:04 +00:00
Alex Gaynor bc6d7d2102 Sped up the staticfiles_tests by allowing them to only search a few relevant directories, rather than every single test application.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 04:24:24 +00:00
Russell Keith-Magee ccc49029b8 Fixed #14181 -- Added a template tag and filters to allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:48:58 +00:00
Russell Keith-Magee 269e921756 Fixed #9886 -- Added a file-like interface to HttpRequest. Thanks to Ivan Sagalaev for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:39:25 +00:00
Russell Keith-Magee 3086b55b0e Fixed #14523 -- Modified response handling so that exceptions raised by process_response() in a middleware are caught and handled like any other exception. Thanks to Ivan Sagalaev for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 07:43:56 +00:00
Honza Král cb17f7ca22 Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!
Introducing ability to cache HEAD requests and GET requests separately by
adding the method to the cache key while preserving the functionality that HEAD
requests can use cached reponses generated by a GET request.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 01:31:15 +00:00
Russell Keith-Magee 8a724802c5 Fixed #14471 -- Corrected a regression in the use of methods on custom managers on related querysets. Thanks to Lucky for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 12:57:04 +00:00
Luke Plant 90ac02300e Fixed #14565 - No csrf_token on 404 page.
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-28 11:47:15 +00:00
Russell Keith-Magee baa1e90d4c Fixed #14504 -- Corrected the way object_list is used in ListView to avoid overwriting context. Includes improved usage of unittest2 assertions. Thanks to Łukasz Rekucki for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 02:58:28 +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
Jannis Leidel 85ef6c0938 Fixed #14544 -- Squashed bug in the findstatic command when used with the --first option.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 14:32:54 +00:00
Ramiro Morales cfdad9ed86 Fixed #14223 -- Extended unification of exception raised in presence of integrity constraint violations.
The unification had been introduced in r12352 and native backend exceptions still
slipped through in cases that end in connection.commit() call. Thanks Alex,
Jacob and Carl for reviewing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 00:01:22 +00:00
Alex Gaynor 085e4c9112 Ensure the mutliple_database tests leave the settings in the same state they found them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 17:37:19 +00:00
Luke Plant 5864834fa5 Fixed a bug with method_decorator not preserving the attributes of the wrapped method, which is important for decorators like csrf_exempt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:49 +00:00
Luke Plant df0bb3c463 Removed old code with Python 2.3 compatibility
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:33 +00:00
Luke Plant 7e19641b03 Fixed test failure when using Python 2.7
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:18 +00:00
Jannis Leidel 1c4868f4c1 Fixed #14507 -- Corrected the logic of the URL helpers and view of 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-21 03:16:41 +00:00
Jannis Leidel cfc19f84de Fixed #12323 and #11582 -- Extended the ability to handle static files. Thanks to all for helping with the original app, the patch, documentation and general support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-20 01:33:24 +00:00
Ramiro Morales cfbba28c39 Fixed errors introduced in r14279 when running Django tests under Python < 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 17:27:38 +00:00
Ramiro Morales bdaaac1254 Converted queries tests from doctests to unittests.
Thanks Russell and Alex for reviews and suggestions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 04:07:22 +00:00
Ramiro Morales e1182306fd Fixed a small typo introduced in r14139.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 00:14:41 +00:00