summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2022-07-19[4.1.x] Fixed #33855 -- Removed unnecessary system check calls from test ↵Mariusz Felisiak
worker initialization. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Backport of 24effbceb871e71d3bc320b91252f743714722df from main
2022-05-19[4.1.x] Fixed #33719 -- Fixed test command crash when running in parallel.Mariusz Felisiak
Thanks Pēteris Caune for the report. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Backport of 41c4cb253c137edf5a96b7408ea55d57d6e0602a from main
2022-04-06Fixed #33348 -- Changed ↵Baptiste Mispelon
SimpleTestCase.assertFormError()/assertFormsetErrors() to take form/formset. Instead of taking a response object and a context name for the form/formset, the two methods now take the object directly.
2022-03-17Refs #31169 -- Prevented infinite loop in parallel tests with custom test ↵David Smith
runner when using spawn. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-03-17Prevented initialization of unused database connections.Florian Apolloner
2022-03-15Fixed #31169 -- Adapted the parallel test runner to use spawn.David Smith
Co-authored-by: Valz <ahmadahussein0@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-03-08Rewrote some references to "master".Adam Johnson
Following d9a266d657f66b8c4fa068408002a4e3709ee669.
2022-02-23Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.Valz
2022-02-15Refs #33348 -- Made SimpleTestCase.assertFormError() raise ValueError when ↵Baptiste Mispelon
"field" is passed without "form_index".
2022-02-15Refs #33348 -- Fixed SimpleTestCase.assertFormError() error message raised ↵Mariusz Felisiak
for unbound forms.
2022-02-15Refs #33348 -- Improved messages raised by ↵Baptiste Mispelon
SimpleTestCase.assertFormError()/assertFormsetErrors(). This makes messages use BaseFormSet/BaseForm.__repr__() instead of context, and adds the _assert_form_error() helper.
2022-02-14Refs #33348 -- Made SimpleTestCase.assertFormsetErrors() raise an error when ↵Baptiste Mispelon
form_index is too big.
2022-02-14Refs #33348 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() ↵Baptiste Mispelon
raise an error for unbound forms/formsets.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2022-01-25Refs #20349 -- Avoided loading testing libraries when not needed.Collin Anderson
2022-01-07Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.Ad Timmering
2022-01-06Refs #33348 -- Deprecated passing errors=None to ↵Baptiste Mispelon
SimpleTestCase.assertFormError()/assertFormsetErrors().
2022-01-06Fixed #33410 -- Fixed recursive capturing of callbacks by ↵Petter Friberg
TestCase.captureOnCommitCallbacks(). Regression in d89f976bddb49fb168334960acc8979c3de991fa.
2022-01-05Fixed #33400 -- Added support for msg_prefix and count arguments to ↵Ad Timmering
assertTemplateUsed()/assertTemplateNotUsed() used as context managers.
2022-01-05Refs #33400 -- Renamed SimpleTestCase._assert_template_used() to ↵Ad Timmering
_get_template_used().
2021-12-17Changed signatures of setting_changed signal receivers.Adam Johnson
2021-12-08Fixed #33346 -- Fixed SimpleTestCase.assertFormsetError() crash on a formset ↵Baptiste Mispelon
named "form". Thanks OutOfFocus4 for the report. Regression in 456466d932830b096d39806e291fe23ec5ed38d5.
2021-11-26Refs #33301 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() ↵Baptiste Mispelon
raise ValueError for non test client responses.
2021-11-15Fixed #33278 -- Improved error for connection/query attempts against ↵SwastikTripathi
disallowed databases in tests.
2021-11-12Fixed #33161 -- Enabled durability check for nested atomic blocks in TestCase.Krzysztof Jagiello
Co-Authored-By: Adam Johnson <me@adamj.eu>
2021-11-08Fixed #33264 -- Made test runner return non-zero error code for unexpected ↵Baptiste Mispelon
successes.
2021-10-29Fixed #33236 -- Fixed assertHTMLEqual() error messages for escaped HTML.Pratyush Mittal
2021-10-26Fixed #27079 -- Avoided multiple setUpClass()/tearDownClass() calls in ↵Jacob Walls
LiveServerTestCase tests.
2021-10-20Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.David Smith
2021-10-18Refs #32956 -- Changed docs to treat the acronym HTTP phonetically.David Smith
2021-10-12Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels.Ade Lee
md5 is not an approved algorithm in FIPS mode, and trying to instantiate a hashlib.md5() will fail when the system is running in FIPS mode. md5 is allowed when in a non-security context. There is a plan to add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate whether or not the instance is being used in a security context. In the case where it is not, the instantiation of md5 will be allowed. See https://bugs.python.org/issue9216 for more details. Some downstream python versions already support this parameter. To support these versions, a new encapsulation of md5() has been added. This encapsulation will pass through the usedforsecurity parameter in the case where the parameter is supported, and strip it if it is not. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-10-11Fixed #33149 -- Made test runner --pdb option work with subTest().Abhyudai
Thanks Lucidot for the report and Mariusz Felisiak for the initial patch.
2021-09-24Fixed #33132 -- Fixed test client handling of querystring only redirects.Jaap Roes
Regression in 1e5aa8e1c79252cc810af21294a6e945d11d37b3.
2021-09-20Refs #31235 -- Made assertQuerysetEqual() not call repr() on a queryset when ↵Mariusz Felisiak
compared to string values. Per deprecation timeline.
2021-09-20Refs #31395 -- Removed support for assigning objects which don't support ↵Mariusz Felisiak
deepcopy() in setUpTestData(). Per deprecation timeline.
2021-08-30Fixed #33054 -- Made TestCase.captureOnCommitCallbacks() capture callbacks ↵Eugene Morozov
recursively.
2021-08-24Fixed #32552 -- Added logger argument to DiscoverRunner.Chris Jerdonek
2021-08-19Refs #31621 -- Fixed handling --parallel option in test management command ↵Mariusz Felisiak
and runtests.py. Regression in ae89daf46f83a7b39d599d289624c3377bfa4ab1. Thanks Tim Graham for the report.
2021-08-05Fixed #32988 -- Prevented creation of more test databases than TestCases.Mariusz Felisiak
DiscoverRunner.parallel is used in setup_databases() and teardown_databases() to control the number of test databases. Regression in cb6c19749d342c3dc0f97d89ff6887b220cf45b8.
2021-08-03Fixed #31621 -- Added support for '--parallel auto' to test management command.Adam Johnson
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-07-16Fixed #32655 -- Deprecated extra_tests argument for ↵Jacob Walls
DiscoverRunner.build_suite()/run_tests().
2021-07-15Fixed #32929 -- Fixed handling query strings in AsyncRequestFactory.pochangl
2021-07-12Fixed #32914 -- Prevented test --shuffle from skipping test methods.Chris Jerdonek
"test --shuffle" skipped test methods when test classes were mixed. This changes runner.py's reorder_tests() to group by TestCase class. Regression in 90ba716bf060ee7fef79dc230b0b20644839069f.
2021-07-09Refs #24522 -- Fixed code comment about seeds in Shuffler.__init__().Chris Jerdonek
2021-07-08Fixed #24522 -- Added a --shuffle option to DiscoverRunner.Chris Jerdonek
2021-07-05Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".Mateo Radman
2021-06-29Refs #32655 -- Improved error if iter_test_cases() is passed a string.Chris Jerdonek