summaryrefslogtreecommitdiff
path: root/tests/test_utils
AgeCommit message (Collapse)Author
2024-11-11Fixed a typo in some tests.yatami38
2024-09-17Fixed #35660 -- Made serialized_rollback and fixture data available in ↵Jacob Walls
TransactionTestCase.setUpClass().
2024-09-17Refs #35660 -- Updated TransactionTestCase methods into class or static methods.Jacob Walls
2024-09-13Closed connection pool in clean up of test_allowed_database_copy_queries.suraj
2024-08-08Fixed #35622 -- Made unittest ignore Django assertions in traceback frames.Adam Johnson
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-03-20Fixed ResourceWarning from unclosed SQLite connection in test_utils on ↵Mariusz Felisiak
Python 3.13+. On SQLite, close() doesn't explicitly close in-memory connections. Follow up to 921670c6943e9c532137b7d164885f2d3ab436b8 and dd45d5223b3c5640baefcb591782bbcff873b6bf.
2024-02-26Refs #32114 -- Fixed test crash on non-picklable objects in subtests when ↵David Wobrock
PickleError is raised. Related to the https://github.com/python/cpython/issues/73373. Follow up to c09e8f5fd8f977bf16e9ec5d11b370151fc81ea8.
2024-02-21Fixed #32114 -- Fixed parallel test crash on non-picklable objects in subtests.David Wobrock
2024-02-19Fixed #35226 -- Reallowed executing queries for dynamically created connections.Mariusz Felisiak
Regression in 8fb0be3500cc7519a56985b1b6f415d75ac6fedb. Thanks Florian Apolloner for the report.
2024-02-19Fixed closing connections in test_utils.tests.AllowedDatabaseQueriesTests.Mariusz Felisiak
2024-02-10Refs #34900, Refs #34118 -- Updated assertion in ↵Daniel Garcia Moreno
test_skip_class_unless_db_feature() test on Python 3.12.2+. Python 3.12.2 bring back the skipped tests in the number of running tests. Refs https://github.com/python/cpython/commit/0a737639dcd3b7181250f5d56694b192eaddeef0
2024-01-12Avoided nested transactions in SkippingClassTestCase.Florian Apolloner
2024-01-03Fixed #33277 -- Disallowed database connections in threads in SimpleTestCase.David Wobrock
2023-12-22Fixed #34658 -- Added SimpleTestCase.assertNotInHTML().Nicolas Lupien
2023-10-16Refs #34900, Refs #34118 -- Updated assertion in ↵Mariusz Felisiak
test_skip_class_unless_db_feature() test on Python 3.12.1+. Python 3.12.1+ no longer includes skipped tests in the number of running tests. Check out: https://github.com/python/cpython/issues/110890#issuecomment-1763458686 https://github.com/python/cpython/pull/106588
2023-10-03Fixed #34657 -- Made assert(Not)Contains/assertInHTML display haystacks in ↵Chinmoy Chakraborty
error messages.
2023-10-03Refs #34657 -- Made msg_prefix handling in assertURLEqual()/assertInHTML ↵Mariusz Felisiak
consistent with other assertions. Co-authored-by: Chinmoy Chakraborty <chinmoy12c@gmail.com>
2023-09-29Refs #34657 -- Made assertInHTML() use unparsed needle in error messages.Chinmoy Chakraborty
2023-09-22Fixed #34823 -- Fixed assertTemplateUsed() context manager crash on unnamed ↵Arian
templates.
2023-09-18Refs #33990 -- Removed TransactionTestCase.assertQuerysetEqual() per ↵Mariusz Felisiak
deprecation timeline.
2023-09-18Refs #33990 -- Removed SimpleTestCase.assertFormsetError() per deprecation ↵Mariusz Felisiak
timeline.
2023-07-14Refs #30686 -- Moved Parser.SELF_CLOSING_TAGS to django.utils.html.VOID_ELEMENTSDavid Smith
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
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
2023-01-18Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak
2023-01-17Refs #33348 -- Removed support for passing response object and form/formset ↵Mariusz Felisiak
name to SimpleTestCase.assertFormError()/assertFormSetError(). Per deprecation timeline.
2023-01-17Refs #33348 -- Removed support for passing errors=None to ↵Mariusz Felisiak
SimpleTestCase.assertFormError()/assertFormsetErrors(). Per deprecation timeline.
2023-01-12Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda
2022-11-24Used DatabaseFeatures.django_test_skips to skip ↵Christophe Baldy
AssertNumQueriesUponConnectionTests tests.
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-07Refs #33990 -- Renamed SimpleTestCase.assertFormsetError() to ↵Gregor Gärtner
assertFormSetError(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-09-06Fixed #33616 -- Allowed registering callbacks that can fail in ↵SirAbhi13
transaction.on_commit(). Thanks David Wobrock and Mariusz Felisiak for reviews.
2022-04-12Fixed #33633 -- Skipped some test_utils tests on databases that don't ↵zhangyangyu
support transactions.
2022-04-07Refs #33173 -- Fixed test_runner/test_utils tests on Python 3.11+.Mariusz Felisiak
Python 3.11 uses fully qualified test name in unittest output. See https://github.com/python/cpython/commit/755be9b1505af591b9f2ee424a6525b6c2b65ce9
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-04-05Moved remaining SimpleTestCase.assertFormError()/assertFormsetErrors() tests ↵Mariusz Felisiak
to test_utils. This also removes redundant tests in test_client_regress. Follow up to 68144f40490b2572c8da4341742b9e387e3f6bdd.
2022-03-08Rewrote some references to "master".Adam Johnson
Following d9a266d657f66b8c4fa068408002a4e3709ee669.
2022-02-22Removed redundant QuerySet.all() calls in docs and tests.Nick Pope
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
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-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.
2021-12-08Fixed #33346 -- Fixed SimpleTestCase.assertFormsetError() crash on a formset ↵Baptiste Mispelon
named "form". Thanks OutOfFocus4 for the report. Regression in 456466d932830b096d39806e291fe23ec5ed38d5.
2021-12-03Fixed #33333 -- Fixed setUpTestData() crash with models.BinaryField on ↵Mariusz Felisiak
PostgreSQL. This makes models.BinaryField pickleable on PostgreSQL. Regression in 3cf80d3fcf7446afdde16a2be515c423f720e54d. Thanks Adam Zimmerman for the report.