summaryrefslogtreecommitdiff
path: root/tests/validation
AgeCommit message (Collapse)Author
2024-08-05Fixed #35638 -- Updated validate_constraints to consider db_default.David Sanders
2024-07-17Refs #34701 -- Moved UniqueConstraint(nulls_distinct) validation tests.Simon Charette
The original tests required the creation of a model that is no longer necessary and were exercising Model.full_clean(validate_constraints) which has nothing to do with the nulls_distinct feature.
2024-07-04Fixed #35569 -- Improved wording of invalid ForeignKey error message.Jacob Walls
2024-03-01Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.Simon Charette
Once the deprecation period ends CheckConstraint.check() can become the documented method that performs system checks for BaseConstraint subclasses.
2023-11-24Fixed #34818 -- Prevented GenericIPAddressField from mutating error messages.Parth Verma
Co-authored-by: Parth Verma <parth.verma@gmail.com>
2023-07-19Fixed #34701 -- Added support for NULLS [NOT] DISTINCT on PostgreSQL 15+.Simon Charette
2022-05-10Fixed #30581 -- Added support for Meta.constraints validation.Gagaro
Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
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
2021-12-06Fixed #33335 -- Made model validation ignore functional unique constraints.Hannes Ljungberg
Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa. Thanks Hervé Le Roy for the report.
2021-07-15Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal
django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-01-14Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.Mariusz Felisiak
2020-06-25Fixed #31596 -- Changed ForeignKey.validate() to use the base manager.Jon Dufresne
2020-04-15Removed unused __str__() methods in tests models.Author: Mads Jensen
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2019-08-20Fixed #29979, Refs #17337 -- Extracted AutoField field logic into a mixin ↵Nick Pope
and refactored AutoFields. This reduces duplication by allowing AutoField, BigAutoField and SmallAutoField to inherit from IntegerField, BigIntegerField and SmallIntegerField respectively. Doing so also allows for enabling the max_length warning check and minimum/maximum value validation for auto fields, as well as providing a mixin that can be used for other possible future auto field types such as a theoretical UUIDAutoField.
2019-06-28Fixed #30400 -- Improved typography of user facing strings.Jon Dufresne
Thanks Claude Paroz for assistance with translations.
2018-11-27Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette
2018-11-27Switched TestCase to SimpleTestCase where possible in Django's tests.Tim Graham
2018-03-20Fixed #29227 -- Allowed BooleanField to be null=True.Tim Graham
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-03Added model name to AutoField error message.Almad
2017-12-28Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak
2017-12-06Fixed #28893 -- Removed unnecessary dict.items() calls.Tim Graham
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Removed str() conversion of type and method __name__.Simon Charette
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
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-04-22Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for ↵Loïc Bistuer
form/model fields.
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-05-06Fixed #24708 -- Handled non-string values in GenericIPAddressField.to_python()Pradeek
2015-04-28Fixed #24714 -- Used more specific assertions than assertEqual in tests.Alasdair Nicol
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-11-03Fixed typos using https://github.com/vlajos/misspell_fixerVeres Lajos
2014-07-02Fixed #22935 -- Changed ForeignKey.default_error_messages['invalid'] to ↵Anubhav Joshi
refer to correct field. Thanks Tim Graham for suggestion and review.
2014-05-01Fixed #22539 -- Copied exclude argument in Model.full_clean() to prevent ↵Yehonatan Daniv
side effects.
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.
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-17Deborgified the app cache.Aymeric Augustin
Improved Andrew's hack to create temporary app caches to handle migrations. Now the main app cache has a "master" flag set to True (which is a non-default keyword argument, thus unlikely to be used by mistake). Other app cache instances have "master" set to False. The only sanctioned way to access the app cache is by importing django.core.apps.app_cache. If you were instanciating an app cache and relying on the Borg pattern, you'll have to refactor your code.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Moved django.db.models.loading to django.apps.cache.Aymeric Augustin
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-07Fixed #21555 -- Made ValidationError pickable.Loic Bistuer
Thanks trac username zanuxzan for the report and original patch.
2013-11-20Fixed #21469 -- Allow set objects in Meta.unique_together.Baptiste Mispelon
Thanks to Tim for the review.
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-24Start attacking E231 violationsAlex Gaynor
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-10-22Fixed E221 pep8 warnings.Tim Graham