summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2007-12-17Fixed #6134 -- Allow an on-disk SQLite database to be used for tests, if ↵Malcolm Tredinnick
required. Patch from jdetaeye. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02Fixed #6024: Django's doctest no longer clashes with coverage.py. Thanks to ↵Jacob Kaplan-Moss
Ned Batchelder for the original fix, and Todd O'Brian for his update to make it work with Django. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-23Corrected a docstring in django.test.TestCase to match the actual behavior.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11Fixed #5898 -- Changed a few response processing paths to make things harder ↵Malcolm Tredinnick
to get wrong and easier to get right. Previous behaviour wasn't buggy, but it was harder to use than necessary. We now have automatic HEAD processing always (previously required ConditionalGetMiddleware), middleware benefits from the Location header rewrite, so they can use relative URLs as well, and responses with response codes 1xx, 204 or 304 will always have their content removed, in accordance with the HTTP spec (so it's much harder to indavertently deliver invalid responses). Based on a patch and diagnosis from regexbot@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11When using assertRedirect(), allow the caller to specify relative URLs andMalcolm Tredinnick
automatically fill in the hostname and scheme (host can be passed in, if different from the default). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-28Fixed #3457 -- Allow overridding of error messages for newforms Fields.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21Modified the test harness to respect the LANGUAGE_CODE setting. Also changedMalcolm Tredinnick
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
2007-09-15Cleaned up a couple of mistakes (a handful of bugs in the test client) that ↵Jacob Kaplan-Moss
I missed in [6333]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #2066: session data can now be stored in the cache or on the ↵Jacob Kaplan-Moss
filesystem. This should be fully backwards-compatible (the database cache store is still the default). A big thanks to John D'Agostino for the bulk of this code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #5445: added some compatibility code for the lack of __iter__ in ↵Jacob Kaplan-Moss
Jython 2.2. Thanks, Leo Soto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #5442 -- Added Jython workaround in django.test._doctest. Thanks, ↵Adrian Holovaty
leo.soto@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@6194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #987 -- Convert relative URI portions into absolute URIs in HTTP ↵Malcolm Tredinnick
Location headers. Based on a patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-04Cleaned up some imports.Gary Wilson Jr
Fixed long lines. Changed some docstrings to use "action words". git-svn-id: http://code.djangoproject.com/svn/django/trunk@6044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-03Removed some duplication in the Django `TestCase` methods by introducing a ↵Gary Wilson Jr
`to_list` function for putting a value into a list if it's not already one. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-03Fixed #4988 -- In the test client, Added tracking of the client and request ↵Russell Keith-Magee
that caused a response so that the assertRedirects check can use the correct client when following a redirect. Well spotted, alex@gc-web.de. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-31Fixed #4968 -- Added assertRedirects handling for paths with GET data. ↵Russell Keith-Magee
Thanks for the patch, Ivan Sagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-28Fixed #4457 -- Corrected the handling of exceptions in the test client when ↵Russell Keith-Magee
the 500.html template is not available. Thanks to Chris Wager <cw264701@ohiou.edu> for his help in tracking down this problem. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6023 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Changed backend create_test_db() and destroy_test_db() hooks NOT to take the ↵Adrian Holovaty
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
2007-08-20Refactored quote_name() to DatabaseOperations.quote_name(). Refs #5106Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-17Fixed #5189 -- Added logout method to test Client. Thanks, Jakub Wisniowski ↵Russell Keith-Magee
<restless.being@gmail.com>. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16Changed django.test.utils.create_test_db to return the name of the test ↵Adrian Holovaty
database that was created git-svn-id: http://code.djangoproject.com/svn/django/trunk@5910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-16Added a return value to the test frameworks ↵Russell Keith-Magee
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
2007-08-16Major refactoring of django.core.management -- it's now a package rather ↵Adrian Holovaty
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
2007-08-12Fixed a Python 2.3 incompatibility.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-28Fixed #4460 -- Added the ability to be more specific in the test cases that ↵Russell Keith-Magee
are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-26Added support for database cache table in test database.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23Fixed #3771 -- Modified the test runner to observe the --noinput argument ↵Russell Keith-Magee
controlling script interactivity. This means that test scripts can now be put in a buildbot environment. This is a backwards incompatible change for anyone that has written a custom test runner. Thanks for the suggestion, moof@metamoof.net. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-21Fixed #4402 -- Modified test client to allow multi-valued inputs on GET ↵Russell Keith-Magee
requests. Thanks for the suggestion, eddymul@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-21Minor fix to allow for count=0 in assertContains.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20Fixed #4738 -- Modified the prompt that is displayed when a test database ↵Russell Keith-Magee
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
2007-07-20Fixed #4901 -- Modified assertContains to provide a default check of 'any ↵Russell Keith-Magee
instances of text in content'. Thanks for the suggestion, nis@superlativ.dk. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20Fixed #3782 -- Added support for the suite() method recommended by the ↵Russell Keith-Magee
Python unittest docs. Thanks for the suggestion, rene.puls@repro-mayr.de. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-14Negligible capitalization fix in test/client.py docstringAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12Fixed #4526 -- Modified the test Client login method to fail when a user is ↵Russell Keith-Magee
inactive. Thanks, marcin@elksoft.pl. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-05Fixed minor typo in assertion message.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
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
2007-06-23Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. AllMalcolm Tredinnick
expected tests pass for all databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-22Backed out the changes in [5482] for a bit whilst some more investigation intoMalcolm Tredinnick
side-effects is done. Refs #4565. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-17Fixed #4565 -- Changed template rendering to use iterators, rather thanMalcolm Tredinnick
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
2007-06-11Fixed a bug in the way file uploads were constructed. The new behaviourMalcolm Tredinnick
should emulate a form upload more accurately. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31Fixed #4426 -- Renamed duplicate doctest module _doctest, and documented the ↵Russell Keith-Magee
fact that it isn't an _exact_ copy of the doctest from Python 2.4. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-29Added new TEST_DATABASE_CHARSET and TEST_DATABASE_COLLATION settings to ensureMalcolm Tredinnick
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
2007-05-14Fixed some incorrect reporting of error messages in assertRedirects, and ↵Russell Keith-Magee
added test cases to validate. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-13Removed a stray import that snuck into [5211].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12Fixed the test harness to work with Python 2.3 again (tested that it stillMalcolm Tredinnick
works with 2.4 and 2.5 as well). git-svn-id: http://code.djangoproject.com/svn/django/trunk@5211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-10Added the actual assertFormError changes, accidentally omitted from [5181].Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-10Fixed import error handling when application tests are stored in a tests ↵Russell Keith-Magee
directory, rather than a tests.py file. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-10Added configurable arguments to assertRedirects and assertContains to allow ↵Russell Keith-Magee
for other response status codes. Thanks for the suggestion, Jiri Barton. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08Added redirection for email services during test conditions.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-07Added assertFormError, assertTemplateUsed and assertTemplateNotUsed for use ↵Russell Keith-Magee
during unit testing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5156 bcc190cf-cafb-0310-a4f2-bffc1f526a37