summaryrefslogtreecommitdiff
path: root/django/test/utils.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed an naming problem with r14258. Thanks to Alex for the report.Russell Keith-Magee2010-10-181-1/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@14260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14487 -- Prevented unittest from leaking into scope via a 'from ↵Russell Keith-Magee2010-10-181-0/+2
| | | | | | django.test.testcases import *' import. Thanks to Jannis for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13895 -- Refactored aggregation_regress doctests. Thanks to Alex ↵Russell Keith-Magee2010-08-201-1/+18
| | | | | | Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13092 -- Added support for the "in" operator when dealing with ↵Russell Keith-Magee2010-08-061-0/+6
| | | | | | context lists. Thanks to clelland for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12659 -- Return a more meaningful KeyError message when ContextList ↵Russell Keith-Magee2010-01-221-1/+1
| | | | | | lookups fail. Thanks to rodriguealcazar for the suggestion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Modified the way EMAIL_BACKEND is specified to make it consistent with the ↵Russell Keith-Magee2010-01-041-1/+1
| | | | | | | | | | | | new "use the class name" policy for backends. This is a BACKWARDS-INCOMPATIBLE CHANGE for anyone using a manually specified EMAIL_BACKEND setting. If you have manually specified EMAIL_BACKEND, you will need to append ".EmailBackend" to your existing EMAIL_BACKEND setting. See the django-dev mailing list for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1142 -- Added multiple database support.Russell Keith-Magee2009-12-221-1/+0
| | | | | | | | | | | | | | | | | This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6262 -- Added a cached template loader, and modified existing ↵Russell Keith-Magee2009-12-141-3/+3
| | | | | | template loaders and tag to be cacheable. Thanks to Mike Malone for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Corrected the order of operations in the test environment setup to ensure ↵Russell Keith-Magee2009-11-041-1/+1
| | | | | | that the original email backend can be restored. Thanks to koenb for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10355 -- Added an API for pluggable e-mail backends.Russell Keith-Magee2009-11-031-21/+9
| | | | | | Thanks to Andi Albrecht for his work on this patch, and to everyone else that contributed during design and development. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10482 -- Unified access to response.context when inspecting responses ↵Russell Keith-Magee2009-03-181-0/+14
| | | | | | from the test client. Thanks to James Bennett for the design, and Julien Phalip for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10165 -- Use settings.TEST_RUNNER in runtests.pyMalcolm Tredinnick2009-02-281-0/+11
| | | | | | | | | | This permits running Django's core tests under an alternative test runner. Most likely useful to non-CPython implementations, rather than much else (since Django's core tests might assume things about the test runner). Patch from Leo Soto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5461 -- Refactored the database backend code to use classes for the ↵Russell Keith-Magee2008-08-111-150/+1
| | | | | | creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Major refactoring of django.dispatch with an eye towards speed. The net ↵Jacob Kaplan-Moss2008-08-061-2/+1
| | | | | | | | | | | | | | | result is that signals are up to 90% faster. Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes. Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated. Documentation is, sigh, still forthcoming. Fixes #6814 and #3951 (with the new dispatch_uid argument to connect). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed the mysql_old backend. It smells bad and has no friends.Malcolm Tredinnick2008-07-181-1/+0
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@7949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7751 -- Added check to allow for the fact that autocommit can be a ↵Russell Keith-Magee2008-07-171-1/+4
| | | | | | property, rather than a function on certain database backends. Thanks to Leo Soto for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6134 -- Allow an on-disk SQLite database to be used for tests, if ↵Malcolm Tredinnick2007-12-171-9/+35
| | | | | | required. Patch from jdetaeye. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Modified the test harness to respect the LANGUAGE_CODE setting. Also changedMalcolm Tredinnick2007-10-211-1/+4
| | | | | | | | Django's own test runner to always use 'en' for LANGUAGE_CODE when testing core. Fixed #4709 git-svn-id: http://code.djangoproject.com/svn/django/trunk@6583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed backend create_test_db() and destroy_test_db() hooks NOT to take the ↵Adrian Holovaty2007-08-201-3/+3
| | | | | | backend as an argument, as the backend as an object is going away git-svn-id: http://code.djangoproject.com/svn/django/trunk@5981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refactored quote_name() to DatabaseOperations.quote_name(). Refs #5106Adrian Holovaty2007-08-201-4/+6
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@5967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed django.test.utils.create_test_db to return the name of the test ↵Adrian Holovaty2007-08-161-0/+6
| | | | | | database that was created git-svn-id: http://code.djangoproject.com/svn/django/trunk@5910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added a return value to the test frameworks ↵Russell Keith-Magee2007-08-161-0/+1
| | | | | | TestSMTPConnection.send_messages, to match the real implementation. Thanks for the suggestion and fix, Michael <absoludity@gmail.com>. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Major refactoring of django.core.management -- it's now a package rather ↵Adrian Holovaty2007-08-161-21/+21
| | | | | | than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added support for database cache table in test database.Malcolm Tredinnick2007-07-261-0/+4
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@5766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4738 -- Modified the prompt that is displayed when a test database ↵Russell Keith-Magee2007-07-201-1/+1
| | | | | | cannot be created. The existing prompt was misleading if the issue wasn't a pre-existing database. Thanks for the suggestion, John Shaffer <jshaffer2112@gmail.com>. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick2007-07-041-2/+2
| | | | | | | | | backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. AllMalcolm Tredinnick2007-06-231-1/+14
| | | | | | | expected tests pass for all databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Backed out the changes in [5482] for a bit whilst some more investigation intoMalcolm Tredinnick2007-06-221-16/+4
| | | | | | | side-effects is done. Refs #4565. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4565 -- Changed template rendering to use iterators, rather thanMalcolm Tredinnick2007-06-171-4/+16
| | | | | | | | creating large strings, as much as possible. This is all backwards compatible. Thanks, Brian Harring. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added new TEST_DATABASE_CHARSET and TEST_DATABASE_COLLATION settings to ensureMalcolm Tredinnick2007-05-291-2/+22
| | | | | | | that databases are created with the expected encoding during testing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5380 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added redirection for email services during test conditions.Russell Keith-Magee2007-05-081-1/+31
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@5173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #2916 -- Moved syncdb call out of simple test runner and into ↵Russell Keith-Magee2007-02-181-0/+3
| | | | | | create_test_db, to match documentation and simplify testing process for people using other test frameworks. Thanks, remco@diji.biz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #2658 -- Modified SQLite cursor close() method for in-memory ↵Russell Keith-Magee2006-09-051-3/+4
| | | | | | databases, making the lifespan of an in-memory database equal to the life of the process, rather than the life of the cursor. Thanks, Ned Batchelder. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refs #2333 - Re-added the template rendering signal for testing purposes; ↵Russell Keith-Magee2006-09-021-1/+29
| | | | | | however, the signal is not available during normal operation. It is only added as part of an instrumentation step that occurs during test framework setup. Previous attempt (r3659) was reverted (r3666) due to performance concerns. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refs #2333 - Added a TEST_DATABASE_NAME setting that can be used to override ↵Russell Keith-Magee2006-09-011-1/+4
| | | | | | the 'test_' + DATABASE_NAME naming policy. This setting is then used in runtests.py to restore the use of 'django_test_db' as the Django model/regression test database. Thanks to Michael Radziej for the feedback. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refs #2333 - Added more documentation for testing framework, and clarified ↵Russell Keith-Magee2006-08-311-3/+0
| | | | | | some code as a result of trying to describe it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Test database creation/deletion now correctly quotes database names when ↵Jacob Kaplan-Moss2006-08-281-5/+5
| | | | | | creating/dropping them. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refs #2333 - Added test framework. This includes doctest and unittest ↵Russell Keith-Magee2006-08-271-0/+78
finders, Django-specific doctest and unittest wrappers, and a pseudo-client that can be used to stimulate and test views. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3658 bcc190cf-cafb-0310-a4f2-bffc1f526a37