summaryrefslogtreecommitdiff
path: root/tests/regressiontests/test_utils/tests.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2013-01-31Deprecated undocumented warnings manipulation testing tools.Ramiro Morales
2012-12-13Fixed #19462 -- Made assertQuerysetEqual detect undefined orderingAnssi Kääriäinen
If there are more than one values to compare against and the qs isn't ordered then assertQuerysetEqual will raise a ValueError.
2012-10-15Fixed assertXMLEqual when first node was a commentClaude Paroz
2012-10-06Added assertXML[Not]Equal assertionsClaude Paroz
This is especially needed to compare XML when hash randomization is on, as attribute order may vary. Refs #17758, #19038. Thanks Taylor Mitchell for the initial patch, and Ian Clelland for review and cleanup.
2012-09-26Fixed #17899 -- Rewrote [Ee]-mail to [Ee]mailAdrien Lemaire
2012-09-07[py3k] Silence many warnings while running the tests.Alex Gaynor
2012-08-16[py3] Fixed test_utils tests of doctests.Aymeric Augustin
2012-08-08[py3] Used compatible imports of StringIO.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-04-29Fixed #18023 -- Removed bundled simplejson.Aymeric Augustin
And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
2012-04-11Fixed #18027 -- Removed an HTMLParser test that doesn't raise any more in ↵Claude Paroz
recent Python versions. Thanks Arfever and Anssi Kaariainen for the report and the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Removed with_statement imports, useless in Python >= 2.6. Refs #17965. ↵Claude Paroz
Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10Fixed #17640 -- Avoided a DeprecationWarning in the test suite. Thanks ↵Aymeric Augustin
zsiciarz and claudep. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-03Made a bunch more edits up until [17418]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17428 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-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-10-13Convert the remainder of the relative imports in the tests to be absolute ↵Alex Gaynor
imports. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 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-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-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-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-04-02Modified some regression tests to make them independent of the default root ↵Russell Keith-Magee
urlconf. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15999 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-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-11-21Fixed #14749 -- added support for using Django's file object as context ↵Alex Gaynor
managers. Thanks to Florian Apolloner for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11Fixed #14508 - test suite silences warnings.Luke Plant
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-10-31Ensure that assertNumQueries doesn't swallow exceptions inside the function.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-17Corrected the skipIfDBFeature and skipUnlessDBFeature decorators to actually ↵Russell Keith-Magee
*run* the tests they decorate. Thanks to Alex for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-12Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given ↵Alex Gaynor
function executes the correct number of queries. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20Made the test case for doctest comparison of XML fragments a little more ↵Russell Keith-Magee
rigorous. Refs #7441. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20Fixed #7441 -- Removed some of the shortcuts in the doctest output ↵Russell Keith-Magee
comparators, and added a wrapper to allow comparison of xml fragments. Thanks to Leo Soto for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19Fixed #7441 - Improved the doctest OutputChecker to be more lenient with ↵Russell Keith-Magee
JSON an XML outputs. This is required so that output ordering that doesn't matter at a semantic level (such as the order of keys in a JSON dictionary, or attributes in an XML element) isn't caught as a test failure. Thanks to Leo Soto for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7981 bcc190cf-cafb-0310-a4f2-bffc1f526a37