Commit Graph

505 Commits

Author SHA1 Message Date
Alex Gaynor cd63ce077d Corrected a suite of test failures when running under postgres.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-17 01:49:36 +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
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
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
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
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
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
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
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 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
Alex Gaynor 80aa4432e6 Fixed #12979 -- allowed using savepoints in TestCase (i.e. tests with transactions disabled), convert the GetOrCreate tests to use this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 06:06:24 +00:00
Russell Keith-Magee b7a73cf929 Fixed #14378 -- Made the test client class customizable. Thanks to Ned Batchelder for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 04:50:47 +00:00
Alex Gaynor ccc43508e3 Fixed #13241. order_with_respect_to now works with ForeignKeys who refer to their model lazily (i.e. with a string). Thanks to Gabriel Grant for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-08 23:54:43 +00:00
Alex Gaynor 5c5f1cfe70 Converted order_with_respect_to to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-08 23:47:11 +00:00
Russell Keith-Magee 24acca4139 Fixed #12012 -- Added support for logging. Thanks to Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04 15:12:39 +00:00
Russell Keith-Magee 11aee35a9f Fixed #11486 -- Corrected the XML serializer to allow for the serialization of objects with a null PK value. Also includes migration of doctests to unittests (we have always been at war with doctests). Thanks to zdmytriv for the report, and Niall Kelly for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-19 14:04:34 +00:00
Russell Keith-Magee 17c097b166 Migrated proxy_models doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:29:21 +00:00
Russell Keith-Magee b7cd1682f5 Migrated reserved_names doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:29:09 +00:00
Russell Keith-Magee 1080937a62 Migrated reverse_lookup doctests. Thanks to Eric Florenzano
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:59 +00:00
Russell Keith-Magee 4f48f25b29 Migrated select_related doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:47 +00:00
Russell Keith-Magee 2055fdbe97 Migrated str doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:38 +00:00
Russell Keith-Magee 6948b280c7 Migrated transactions doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:29 +00:00
Russell Keith-Magee a60948cef2 Migrated unmanaged_models doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:18 +00:00
Russell Keith-Magee 268123e784 Migrated the update doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:10 +00:00
Russell Keith-Magee 050aa57990 Migrated user_commands doctests. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:28:01 +00:00
Malcolm Tredinnick 3d99526fc2 Fix a couple of typos in test names and descriptions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13821 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 05:08:21 +00:00
Malcolm Tredinnick 1e7b2f5a06 Fixed the get_or_create tests for postgreSQL, by using
TransactionTestCase.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 22:03:44 +00:00
Russell Keith-Magee 93cda768ee Migrated expressions doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:05:17 +00:00
Russell Keith-Magee 45651dcb05 Migrated empty doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:05:07 +00:00
Russell Keith-Magee 21e7987c4c Migrated m2m_multiple doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:57 +00:00
Russell Keith-Magee 935aa4c6a1 Migrated m2m_intermediary doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:48 +00:00
Russell Keith-Magee 5874b11e4d Migrate m2m_and_m2o doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:38 +00:00
Russell Keith-Magee 4d77fee299 Migrate get_or_create doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:30 +00:00
Russell Keith-Magee 19bd2b6f02 Migrated get_object_or_404 doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:21 +00:00
Russell Keith-Magee 14a5e62f86 Migrate get_latest doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:12 +00:00
Russell Keith-Magee f1f86e0173 Migrated the force_insert_update tests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:04:04 +00:00
Russell Keith-Magee a45c687ecf Migrate the files doctests. Thanks to Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 20:03:55 +00:00