summaryrefslogtreecommitdiff
path: root/tests/check_framework/tests.py
AgeCommit message (Collapse)Author
2025-11-13Fixed #36663 -- Defaulted to running checks against all databases.Simon Charette
Regression in 0b83c8cc4db95812f1e15ca19d78614e94cf38dd which added support for running checks only against databases but also defaulted to running against no databases if not specified. Note that this continues to *not* default to runing database tagged checks for all management commands except the migrate one as whether or not we should change this must be discussed further. Thanks Tim Graham for surfacing how this was a problematic default.
2025-11-13Refs #31055 -- Augmented regression tests for database system checks.Simon Charette
We might want to change this in the future but it should be further discussed first.
2022-07-19Fixed #33855 -- Removed unnecessary system check calls from test worker ↵Mariusz Felisiak
initialization. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
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-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-06-15Fixed #30427, Fixed #16176 -- Corrected setting descriptor in ↵Carlton Gibson
Field.contribute_to_class(). Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
2021-03-19Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.core.Daniyal
2020-12-14Ensured that registered checks accept keyword arguments.Adam Johnson
2020-02-07Refs #31055 -- Added --database option to the check management command.Simon Charette
This avoids enabling the ``database`` checks unless they are explicitly requested and allows to disable on a per-alias basis which is required when only creating a subset of the test databases. This also removes unnecessary BaseCommand._run_checks() hook.
2017-12-28Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-01-24Removed unneeded force_text calls in the test suiteClaude Paroz
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 encoding preambles and future importsClaude Paroz
2016-12-29Fixed #25415 -- Made DiscoverRunner run system checks.Adam Chainz
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-08-16Fixed crash comparing CheckMessage objects to non-CheckMessage objects.Adam Chainz
2016-08-16Added tests for check Message equality.Adam Chainz
2016-06-28Replaced use of TestCase.fail() with assertRaises().Tim Graham
Also removed try/except/fail antipattern that hides exceptions.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-02-12Removed unneeded hint=None/obj=None in system check messages.Tim Graham
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2016-01-06Fixed #25746 -- Isolated inlined test models registration.Simon Charette
Thanks to Tim for the review.
2015-10-05Fixed #25500 -- Added --fail-level option to check command.Jon Dufresne
This option specifies the level that check command exits with a non-zero status. Default is ``ERROR``.
2015-08-28Fixed #25318 -- Made SILENCED_SYSTEM_CHECKS suppress all messages.Tim Graham
Previously, messages of ERROR level or higher were printed to the console.
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-02-09Removed Django 1.7 MIDDLEWARE_CLASSES upgrade check.Tim Graham
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24149 -- Normalized tuple settings to lists.darkryder
2015-01-05Fixed test failures introduced in refs #23861.Tim Graham
2014-11-27Fixed #23338 -- Added warning when unique=True on ForeigKeyDiego Guimarães
Thanks Jonathan Lindén for the initial patch, and Tim Graham and Gabe Jackson for the suggestions.
2014-11-13Fixed #23765 -- Removed BooleanField default check which often yielded false ↵Tim Graham
positives.
2014-11-11Fixed #23750 -- Allowed core.checks.register to be used as a functionaverybigant
2014-10-17Fixed #23469 -- Removed test runner compatibility check which often yielded ↵Tim Graham
false positives.
2014-10-16Fixed #23615 -- Validate that a Model instance's "check" attribute is a method.Rigel Di Scala
The "check" name is a reserved word used by Django's check framework, and cannot be redefined as something else other than a method, or the check framework will raise an error. This change amends the django.core.checks.model_check.check_all_models() function, so that it verifies that a model instance's attribute "check" is actually a method. This new check is assigned the id "models.E020".
2014-10-16Minor cleanup in the check_framework test package.Loic Bistuer
2014-09-12Fixed #17101 -- Integrated django-secure and added check --deploy optionTim Graham
Thanks Carl Meyer for django-secure and for reviewing. Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and Jorge Carleitao for reviews.
2014-06-30Added spaces to message from 4c39c270af91ddbc213e077fc06b4bf67c7c6e99.Tim Graham
2014-06-13Fixed #22477 -- Removed contrib middleware from the global settings defaults.mlavin
Also added a compatibility check for changed middleware defaults. Forwardport of d94de802d3 from stable/1.7.x
2014-04-18Fixed a test failure introduced by 214d1e1b0f.Simon Charette
2014-04-10Fixed #22194 -- Added --list-tags option to check command.Tim Graham
Thanks Elvard for the patch.
2014-03-03Corrected expected test output to allow for cleanups in signal and ↵Russell Keith-Magee
compatibility checks.
2014-01-28Fixed #21849 -- Included the count of silenced system checks in output.Tim Graham
2014-01-20Fix a check_framework test so it doesn't fail when TEST_RUNNER is set (e.g. ↵Carl Meyer
on CI).
2014-01-20Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.