summaryrefslogtreecommitdiff
path: root/django/test
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #32172 -- Adapted signals to allow async handlers.Jon Janzen2023-03-072-4/+2
| | | | | co-authored-by: kozzztik <kozzztik@mail.ru> co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
* Fixed #34342, Refs #33735 -- Fixed test client handling of async streaming ↵Alexandre Spaeth2023-02-171-9/+26
| | | | | | | | responses. Bug in 0bd2c0c9015b53c41394a1c0989afbfd94dc2830. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-013-5/+1
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak2023-01-181-1/+1
|
* Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak2023-01-182-29/+2
|
* Refs #33348 -- Removed support for passing response object and form/formset ↵Mariusz Felisiak2023-01-171-130/+1
| | | | | | name to SimpleTestCase.assertFormError()/assertFormSetError(). Per deprecation timeline.
* Refs #33348 -- Removed support for passing errors=None to ↵Mariusz Felisiak2023-01-171-18/+0
| | | | | | SimpleTestCase.assertFormError()/assertFormsetErrors(). Per deprecation timeline.
* Refs #32655 -- Removed extra_tests argument for ↵Mariusz Felisiak2023-01-171-20/+3
| | | | | | DiscoverRunner.build_suite()/run_tests(). Per deprecation timeline.
* Refs #32446 -- Removed SERIALIZE test database setting per deprecation timeline.Mariusz Felisiak2023-01-171-21/+3
|
* Fixed #34240 -- Preserved headers of requests made with django.test.Client ↵Mariusz Felisiak2023-01-132-0/+12
| | | | | in assertRedirects(). Bug in 67da22f08e05018ea968fcacbac9ac37ea925d85.
* Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda2023-01-121-2/+25
|
* Fixed #26029 -- Allowed configuring custom file storage backends.Jarosław Wygoda2023-01-121-0/+17
|
* Refs #33865 -- Improved implementation of FakePayload.Nick Pope2023-01-051-16/+26
| | | | | | | | | | | | | | | | FakePayload is a wrapper around io.BytesIO and is expected to masquerade as though it is a file-like object. For that reason it makes sense that it should inherit the correct signatures from io.BytesIO methods. Crucially an implementation of .readline() is added which will be necessary for this to behave more like the expected file-like objects as LimitedStream will be changed to defer to the wrapped stream object rather than rolling its own implementation for improved performance. It should be safe to adjust these signatures because FakePayload is only used internally within test client helpers, is undocumented, and thus private.
* Refs #34118 -- Adopted asgiref coroutine detection shims.Carlton Gibson2022-12-202-5/+5
| | | Thanks to Mariusz Felisiak for review.
* Fixed #29062 -- Prevented possibility of database lock when using ↵baldychristophe2022-11-241-1/+3
| | | | | | LiveServerTestCase with in-memory SQLite database. Thanks Chris Jerdonek for the implementation idea.
* Fixed #34074 -- Added headers argument to RequestFactory and Client classes.David Wobrock2022-11-141-37/+172
|
* Updated documentation and comments for RFC updates.Nick Pope2022-11-101-2/+2
| | | | | | | | | | | | | | | - Updated references to RFC 1123 to RFC 5322 - Only partial as RFC 5322 sort of sub-references RFC 1123. - Updated references to RFC 2388 to RFC 7578 - Except RFC 2388 Section 5.3 which has no equivalent. - Updated references to RFC 2396 to RFC 3986 - Updated references to RFC 2616 to RFC 9110 - Updated references to RFC 3066 to RFC 5646 - Updated references to RFC 7230 to RFC 9112 - Updated references to RFC 7231 to RFC 9110 - Updated references to RFC 7232 to RFC 9110 - Updated references to RFC 7234 to RFC 9111 - Tidied up style of text when referring to RFC documents
* Fixed #34063 -- Fixed reading request body with async request factory and ↵Scott Halgrim2022-11-081-3/+7
| | | | | | | client. Co-authored-by: Kevan Swanberg <kevswanberg@gmail.com> Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
* Used more augmented assignment statements.Nick Pope2022-10-311-1/+1
| | | | | | Identified using the following command: $ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
* Fixed #34111 -- Made test runner with --debug-sql format SQL queries.Giebisch2022-10-241-1/+5
|
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-081-1/+10
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Refs #33990 -- Renamed SimpleTestCase.assertFormsetError() to ↵Gregor Gärtner2022-10-071-8/+17
| | | | | | assertFormSetError(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Refs #34010 -- Made --debug-mode work for parallel tests using spawn.Adam Johnson2022-09-281-2/+8
| | | | | | Bug in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Thanks Kevin Renskers for the report.
* Fixed #34010 -- Made parallel tests using spawn set up Django.Adam Johnson2022-09-281-0/+2
| | | | | | Bug in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Thanks Kevin Renskers for the report.
* Fixed #33616 -- Allowed registering callbacks that can fail in ↵SirAbhi132022-09-061-2/+17
| | | | | | transaction.on_commit(). Thanks David Wobrock and Mariusz Felisiak for reviews.
* Fixed #33891 -- Fixed test command crash when running in parallel using spawn.Mariusz Felisiak2022-08-041-8/+6
| | | | | Thanks Kevin Renskers for the report. Regression in 41c4cb253c137edf5a96b7408ea55d57d6e0602a.
* Fixed #33855 -- Removed unnecessary system check calls from test worker ↵Mariusz Felisiak2022-07-191-8/+1
| | | | | initialization. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
* Fixed #33755 -- Moved ASGI body-file cleanup into request class.Jonas Lundberg2022-06-091-0/+3
|
* Fixed #33719 -- Fixed test command crash when running in parallel.Mariusz Felisiak2022-05-191-2/+16
| | | | | Thanks Pēteris Caune for the report. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
* Fixed #33348 -- Changed ↵Baptiste Mispelon2022-04-061-90/+169
| | | | | | | 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.
* Refs #31169 -- Prevented infinite loop in parallel tests with custom test ↵David Smith2022-03-171-2/+1
| | | | | | | | runner when using spawn. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Prevented initialization of unused database connections.Florian Apolloner2022-03-172-3/+3
|
* Fixed #31169 -- Adapted the parallel test runner to use spawn.David Smith2022-03-151-8/+51
| | | | | Co-authored-by: Valz <ahmadahussein0@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
* Rewrote some references to "master".Adam Johnson2022-03-081-2/+2
| | | | Following d9a266d657f66b8c4fa068408002a4e3709ee669.
* Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.Valz2022-02-231-7/+1
|
* Refs #33348 -- Made SimpleTestCase.assertFormError() raise ValueError when ↵Baptiste Mispelon2022-02-151-0/+4
| | | | "field" is passed without "form_index".
* Refs #33348 -- Fixed SimpleTestCase.assertFormError() error message raised ↵Mariusz Felisiak2022-02-151-1/+1
| | | | for unbound forms.
* Refs #33348 -- Improved messages raised by ↵Baptiste Mispelon2022-02-151-104/+43
| | | | | | | SimpleTestCase.assertFormError()/assertFormsetErrors(). This makes messages use BaseFormSet/BaseForm.__repr__() instead of context, and adds the _assert_form_error() helper.
* Refs #33348 -- Made SimpleTestCase.assertFormsetErrors() raise an error when ↵Baptiste Mispelon2022-02-141-1/+9
| | | | form_index is too big.
* Refs #33348 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() ↵Baptiste Mispelon2022-02-141-0/+12
| | | | raise an error for unbound forms/formsets.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-072-12/+44
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-078-748/+1291
|
* Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak2022-02-031-2/+1
| | | | | | | | | | | | | | | | | 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], )
* Refs #20349 -- Avoided loading testing libraries when not needed.Collin Anderson2022-01-252-3/+4
|
* Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.Ad Timmering2022-01-071-1/+1
|
* Refs #33348 -- Deprecated passing errors=None to ↵Baptiste Mispelon2022-01-061-9/+22
| | | | SimpleTestCase.assertFormError()/assertFormsetErrors().
* Fixed #33410 -- Fixed recursive capturing of callbacks by ↵Petter Friberg2022-01-061-7/+5
| | | | | | TestCase.captureOnCommitCallbacks(). Regression in d89f976bddb49fb168334960acc8979c3de991fa.
* Fixed #33400 -- Added support for msg_prefix and count arguments to ↵Ad Timmering2022-01-051-32/+30
| | | | assertTemplateUsed()/assertTemplateNotUsed() used as context managers.
* Refs #33400 -- Renamed SimpleTestCase._assert_template_used() to ↵Ad Timmering2022-01-051-3/+3
| | | | _get_template_used().
* Changed signatures of setting_changed signal receivers.Adam Johnson2021-12-171-34/+36
|