summaryrefslogtreecommitdiff
path: root/tests/test_utils
AgeCommit message (Collapse)Author
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-06-16Fixed #27539 -- Made TransactionTestCase._pre_setup() clear the queries_log ↵reficul31
so it's less likely to overflow. TransactionTestCase.assertNumQueries() fails in an overflow situation.
2017-05-20Fixed #28180 -- Numbered queries in assertNumQueries failure outputClaude Paroz
Thanks Tim Graham for the test part.
2017-05-18Fixed #28203 -- Ignored connection configuration queries in assertNumQueries().François Freitag
2017-03-17Replaced type-specific assertions with assertEqual().Tim Graham
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-02-24Fixed #27873 -- Fixed crash in setup_test_environment() if ALLOWED_HOSTS is ↵Chris Lamb
a tuple. Regression in 17e661641ddaf8266e7430d83cfb2039abc55df7
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-20Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.Tim Graham
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-20Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.Tim Graham
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #25190 -- Removed callable_obj parameter to assertRaisesMessages().Tim Graham
Per deprecation timeline.
2017-01-11Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.François Freitag
Thanks to Josh Smeaton for the idea of implementing server-side cursors in PostgreSQL from the iterator method, and Anssi Kääriäinen and Kevin Turner for their previous work. Also Simon Charette and Tim Graham for review.
2016-12-07Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.Tim Graham
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-13Fixed #27214 -- Made skip db features decorators respect wrapping order and ↵Simon Charette
inheritance.
2016-08-31Fixed #24112 -- Fixed assertInHTML()'s counting if needle has no root element.Adam Zapletal
2016-08-08Fixed #27032 -- Prevented setup_test_environment() from being called twice.Chris Jerdonek
2016-07-21Fixed #26922 -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+.Dmitry Dygalo
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-02-13Fixed #11665 -- Made TestCase check deferrable constraints after each test.Jon Dufresne
2016-01-29Refs #26022 -- Used context manager version of assertRaisesMessage in tests.Hasan
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2016-01-06Refs #25746 -- Added a test utility to isolate inlined model registration.Simon Charette
Thanks to Tim for the review.
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-11-09Fixed #25170 -- Made assertXMLEqual()/assertXMLNotEqual() ignore leading and ↵Mattia Larentis
trailing whitespace. Thanks Jacek Bzdak for indepdently contributing a similar fix.
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-08-24Fixed #23727 -- Inhibited the post_migrate signal when using ↵Tommy Beadle
serialized_rollback. When using a TransactionTestCase with serialized_rollback=True, after creating the database and running its migrations (along with emitting the post_migrate signal), the contents of the database are serialized to _test_serialized_contents. After the first test case, _fixture_teardown() would flush the tables but then the post_migrate signal would be emitted and new rows (with new PKs) would be created in the django_content_type table. Then in any subsequent test cases in a suite, _fixture_setup() attempts to deserialize the content of _test_serialized_contents, but these rows are identical to the rows already in the database except for their PKs. This causes an IntegrityError due to the unique constraint in the django_content_type table. This change made it so that in the above scenario the post_migrate signal is not emitted after flushing the tables, since it will be repopulated during fixture_setup().
2015-08-04Fixed #25191 -- Added string diff to SimpleTestCase.assertXMLEqual() message.Caio Ariede
2015-08-01Refs #25176 -- Fixed typo in tests/test_utils/tests.pyTim Graham
2015-08-01Fixed #25176 -- Prevented TestCase.setUpTestData() exception from leaking ↵Adam Chainz
transaction.
2015-07-31Fixed #25188 -- Improved message raised by SimpleTestCase.assertRaisesMessage().Tim Graham
Thanks Chris Jerdonek for the suggestion and help with the patch.
2015-07-30Fixed #25190 -- Deprecated callable_obj parameter to assertRaisesMessage().Tim Graham
Thanks Aymeric Augustin for review.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-05-20Fixed #24652 -- Disallowed query execution in SimpleTestCase subclasses.Simon Charette
Thanks to Tim and Anssi for the review.
2015-05-18Added backwards compatibility for assertRaisesMessage callable_obj param.Tim Graham
This was broken in c2bc1cefdcbbf074408f4a4cace88b315cf9d652 (refs #23763).
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-04Fixed #24197 -- Added clearing of staticfiles caches on settings changes ↵mlavin
during tests Cleared caching in staticfiles_storage and get_finder when relevant settings are changed.
2014-12-24Fixed typo in test_utils comment.Tim Graham
2014-12-01Fixed #23933 -- Made override_settings(DATABASE_ROUTERS) affect the master ↵wrwrwr
router.
2014-11-03Fixed #23300 -- Made assertTemplateUsed throw an error on responses not ↵Davide Ceretti
fetched using the test client. Thanks zags for the report and bmispelon for the patch.
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-10-31Avoided using private API get_template_from_string.Aymeric Augustin
2014-10-08Fixed #23600 -- Made default_storage aware of more settings changes.Duncan Parkes
Added MEDIA_URL, FILE_UPLOAD_PERMISSIONS, and FILE_UPLOAD_DIRECTORY_PERMISSIONS to the list of settings.
2014-09-30Fixed flake8 warnings.Tim Graham
2014-09-29Fixed #23567 -- Made assertQuerysetEqual check Counter equality when ↵Thomas Chaumeny
ordered=False