summaryrefslogtreecommitdiff
path: root/django/test/testcases.py
AgeCommit message (Collapse)Author
2019-02-14[2.2.x] Fixed #30171 -- Fixed DatabaseError in servers tests.Jon Dufresne
Made DatabaseWrapper thread sharing logic reentrant. Used a reference counting like scheme to allow nested uses. The error appeared after 8c775391b78b2a4a2b57c5e89ed4888f36aada4b. Backport of 76990cbbda5d93fda560c8a5ab019860f7efaab7 from master.
2019-01-21[2.2.x] Fixed #30121 -- Fixed assertURLEqual() crash with reverse_lazy() URLs.Jon Dufresne
Regression in 24959e48d949a20be969f649ece3576dbc7ce422. Backport of d15c61cabbe1c15068ffeb58c64035057f0c7d5c from master.
2019-01-14Refs #28478 -- Prevented database feature based skipping on tests ↵Simon Charette
disallowing queries. Database features may require a connection to be established to determine whether or not they are enabled.
2019-01-14Refs #28478 -- Prevented connection attempts against disallowed databases in ↵Simon Charette
tests. Mocking connect as well as cursor methods makes sure an appropriate error message is surfaced when running a subset of test attempting to access a a disallowed database.
2019-01-10Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in ↵Simon Charette
favor of databases.
2018-12-05Reverted "Fixed #25251 -- Made data migrations available in ↵Tim Graham
TransactionTestCase when using --keepdb." This reverts commits b3b1d3d45fc066367f4fcacf0b06f72fcd00a9c6 and 9fa0d3786febf36c87ef059a39115aa1ce3326e8 due to reverse build failures for which a solution isn't forthcoming.
2018-11-06Fixed #25251 -- Made data migrations available in TransactionTestCase when ↵romgar
using --keepdb. Data loaded in migrations were restored at the beginning of each TransactionTestCase and all the tables are truncated at the end of these test cases. If there was a TransactionTestCase at the end of the test suite, the migrated data weren't restored in the database (especially unexpected when using --keepdb). Now data is restored at the end of each TransactionTestCase.
2018-11-03Fixed #29883 -- Added selenium hub support to runtests.py.Tom Forbes
2018-09-28Refs #28909 -- Simplifed code using unpacking generalizations.Sergey Fedoseev
2018-07-18Removed duplicate words in various comments.Mariusz Felisiak
2018-06-20Fixed #27398 -- Added an assertion to compare URLs, ignoring the order of ↵Jan Pieter Waagmeester
their query strings.
2018-05-09Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage().Morgan Aubert
2018-03-31Fixed #29275 -- Made assertFormError() output "(actual errors: none)" ↵Chris Lamb
instead of "(actual errors: )".
2018-02-10Refs #27795 -- Removed force_text() usage in django/test/testcases.py.Jon Dufresne
2017-12-21Refs #28909 -- Simplifed code using unpacking generalizations.Nick Pope
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-12-04Fixed #28860 -- Removed unnecessary len() calls.Дилян Палаузов
2017-11-28Fixed #28853 -- Updated connection.cursor() uses to use a context manager.Jon Dufresne
2017-09-25Refs #27857 -- Replaced json.loads() ValueError exception catching with ↵Tim Graham
JSONDecodeError.
2017-09-09Fixed some comments referring to a nonexistent TestClient class.Luoxzhg
2017-06-18Refs #27539 -- Fixed typo in TransactionTestCase._pre_setup() comment.François Freitag
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-06-16Refs #27787 -- Corrected or removed invalid call_command() options.Chandrakant Kumar
2017-05-30Fixed #28212 -- Allowed customizing the port that LiveServerTestCase uses.Robert Rollins
Forwardport of 877d7b71ae952b3bc946e5187d6c23039a71614d from stable/1.11.x
2017-05-20Fixed #28180 -- Numbered queries in assertNumQueries failure outputClaude Paroz
Thanks Tim Graham for the test part.
2017-03-04Refs #27656 -- Updated remaining docstring verbs according to PEP 257.Anton Samarchyan
2017-02-13Added TransactionTestCase.multi_db instead of using getattr().Tim Graham
2017-02-09Fixed #20238 -- Added threading support to LiveServerTestCase.Nadège Michel
2017-02-01Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.Vytis Banaitis
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
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 six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
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-17Refs #23960 -- Removed the host parameter for SimpleTestCase.assertRedirects().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-09-13Fixed #27214 -- Made skip db features decorators respect wrapping order and ↵Simon Charette
inheritance.
2016-08-19Fixed #22414 -- Ensured that LiveServerTestCase closes connections.Chris Jerdonek
2016-08-17Fixed #27077 -- Made SQLite's in-memory database checks DRYer.Chris Jerdonek
2016-08-01Fixed #26976 -- Added LiveServerTestCase.server_thread_class to ease ↵Chris Jerdonek
subclassing.
2016-07-21Fixed #26922 -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+.Dmitry Dygalo
2016-06-23Fixed #26791 -- Replaced LiveServerTestCase port ranges with binding to port 0.Tim Graham
2016-06-20Refs #26666 -- Added ALLOWED_HOSTS validation when running tests.Tobias McNulty
Also used ALLOWED_HOSTS to check for external hosts in assertRedirects().
2016-06-02Refs #26666 -- Fixed test failures caused by assertRedirects changes (#6701)Tobias McNulty
2016-06-02Fixed #26666 -- Added more useful error message to assertRedirectsTobias McNulty
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-04Fixed W503 flake8 warnings.Tim Graham