summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2012-02-01Improved the fix of r17416 so it actually works on all platforms. Refs #17469.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-01Fixed #17469 -- Prevented a double URL-to-filesystem path translation in the ↵Aymeric Augustin
media handler of LiveServerTestCase, which led to infinite redirection loops under Windows and test failures. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and ↵Carl Meyer
converted Django tests to use them where appropriate. Thanks Greg Müllegger. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31Fixed #17604 - Added context-manager capability to assertTemplateUsed and ↵Carl Meyer
assertTemplateNotUsed. Thanks Greg Müllegger. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-30Fixed #10868 -- Stopped restoring database connections after the tests' ↵Julien Phalip
execution in order to prevent the production database from being exposed to potential threads that would still be running. Also did a bit of PEP8-cleaning while I was in the area. Many thanks to ovidiu for the report and to Anssi Kääriäinen for thoroughly investigating this issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-20Fixed #16885 -- Confirmed features of mirror databases when setting up test ↵Aymeric Augustin
databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-07Fixed #17499 -- Ensured assertFieldOutput works for fields that customize ↵Aymeric Augustin
the "required" error message. Thanks dpifke for the report and patch, and claudep for the tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-29Added the ability to specify multiple ports available for the ↵Julien Phalip
`LiveServerTestCase` WSGI server. This allows multiple processes to run the tests simultaneously and is particularly useful in a continuous integration context. Many thanks to Aymeric Augustin for the suggestions and feedback. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22Fixed #2879 -- Added support for the integration with Selenium and other ↵Julien Phalip
in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-27Fixed #16040 -- Preserved scheme, host and port in the test client when ↵Aymeric Augustin
following a redirect. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22Fixed #15826 -- Made `assertContains` and `assertNotContains` work with ↵Julien Phalip
`SimpleTemplateResponse` by forcing it to be rendered if it hasn't been rendered yet. Thanks to bmihelac for the report, to mmcnickle for the initial patch and tests, and to Carl Meyer for the guidance. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18Fixed #17067 -- reverted some backwards-incompatible changes from r16933 and ↵Aymeric Augustin
added tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17010 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-08Fixed #17011 - Made override_settings modify a decorated class in-place ↵Carl Meyer
rather than creating a dynamic subclass, so as to avoid infinite recursion when used with super(). Thanks jsdalton for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-06Fixed #16705 - Made the test client adhere to the WSGI spec -- in ↵Aymeric Augustin
particular, removed the assumption that environ['QUERY_STRING'] exists. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-05Fixed #16990 -- Fixed a couple of small docstring typos in the ↵Julien Phalip
`django/test/testcases.py` module and did some minor cleanup while I was in the area. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-04Also copy `__module__` to our dynamically created TestCase subclass when ↵Ramiro Morales
override_settings acts as a class decorator. Otherwise, an error in e.g. a test in tests/modeltests/proxy_model_inheritance/tests.py was being reported as: ERROR: test_table_exists (django.test.utils.ProxyModelInheritanceTests) Refs #16672 and [16650]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Add the ability to do unordered comparisons in assertQuerysetEqual.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Fixed #15838 -- Promoted assertFieldOutput to a general test utility. Thanks ↵Russell Keith-Magee
to Ramiro Morales for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Fixed #10571 -- Factored out the payload encoding code to make sure it is ↵Russell Keith-Magee
used for PUT requests. Thanks to kennu for the report, pterk for the patch, and wildfire for the review comments. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Fixed #16672 -- Ensure that test classes decorated with @override_setings ↵Russell Keith-Magee
gets the right name when running the tests. Thanks to Julien Phalip for the report and initial patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@16650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13Fixed #14503 -- Unified multiple implementations of test cases assert* ↵Ramiro Morales
methods that verify a given exception is raised by a callable throughout the Django test suite. Replaced them with a new assertRaisesMessage method of a new SimpleTestCase, a lightweight subclass of unittest.TestCase. Both are also available for usage in user tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-10Made override_settings also work with TransactionTestCase when acting as a ↵Ramiro Morales
class decorator. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-02Fixed #16372 -- Changed strategy implemented in r16369 to fix #14049 to ↵Ramiro Morales
avoid affecting the statistics of test cases ran/skipped kept by unittest. Thanks zimnyx for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29Fixed #16437 -- Removed old code comment from testcases module. Thanks, teraom.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-10Fixed #16447 -- Stopped using the setting name as the sender parameter for ↵Jannis Leidel
the setting_changed signal. Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-14Fixed #16239 -- Removed stale entry in django.test.simple.__all__. Thanks, ↵Jannis Leidel
melinath. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-12Fixed #7836 -- Modified strategy used by the test client to check for ↵Ramiro Morales
session functionality so it is useful in environments where the DB-based session backend isn't being used. Thanks trevor for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-12Fixed #12658 -- Fixed test discovery so ImportErrors aren't ignored when ↵Ramiro Morales
both `tests` and `models` are packages. Thanks schinckel for the report and boxm for a patch for the issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11Fixed #16224 -- Fixed override_settings test utility to correctly work with ↵Jannis Leidel
TestCase classes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11Fixed #14049 -- Made our TestCase subclasses not load database fixtures (nor ↵Ramiro Morales
set up custom URLconfs) for test methods that are going to be skipped. Thanks zimnyx for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10Fixed #16185, #15675 -- Added the ability for test runners to define custom ↵Russell Keith-Magee
options, and to specify a custom test runner at the command line. Thanks to Dmitry Jemerov and Mikołaj Siedlarek for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-29Fixed #11436 -- Updated bundled copy of doctests.py to the one shipped with ↵Ramiro Morales
Python 2.5, preserved local tweaks. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16292 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-18Fixed #15561 -- Extended test setting override code added in r16165 with a ↵Jannis Leidel
decorator and a signal for setting changes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06Added TestCase.settings context manager to easily override settings in test ↵Jannis Leidel
methods. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-17Fixes #15814 -- Added a test util to abstract the process of using a test ↵Chris Beaven
template loader git-svn-id: http://code.djangoproject.com/svn/django/trunk@16030 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Advanced deprecations in django.test.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Removed a usage of the depreacted SMTPConnection in test.utils.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Move the Python 2.5 specific tests out of their own special files now that ↵Alex Gaynor
2.5 is the default. Also add __futre__ import where necessary. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch more Python 2.4 workarounds now that we don't support that ↵Adrian Holovaty
version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-18Fixed #15368 -- Ensure that raw unittest TestCase instances can be invoked ↵Russell Keith-Magee
individually by the test runner. Thanks to SmileyChris for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. ↵Adrian Holovaty
Thanks, DaNmarner git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21Fix broken tests due to changes in r15591 by updating the test ↵Chris Beaven
store_rendered_templates signal handler. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-02Fixed #15029 -- Moved to database backends the ability to decide if two ↵Ramiro Morales
DATABASES items are different when creating temporary databases for tests. hG: Enter commit message. Lines beginning with 'HG:' are removed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21Fixed #14753 -- Fixed the test client to not raise an AssertionError when ↵Ramiro Morales
request.raw_post_data is accessed from a view it has fetched with GET. Thanks zimnyx for the report and ojii for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-20Fixed #14774 -- the test client and assertNumQueries didn't work well ↵Alex Gaynor
together. Thanks to Jonas Obrist for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22Fixed #14939: Don't strip ;-parameters from URLs in the test client.Andrew Godwin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-09Fixed a couple of typos and small errors from r14696 and r14822.Ramiro Morales
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05Fixed #14799 -- Provided a full solution for test database creation order ↵Russell Keith-Magee
problems. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14822 bcc190cf-cafb-0310-a4f2-bffc1f526a37