summaryrefslogtreecommitdiff
path: root/tests/validation
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #30581 -- Added support for Meta.constraints validation.Gagaro2022-05-103-4/+151
| | | | Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-10/+18
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-077-191/+327
|
* Fixed #33335 -- Made model validation ignore functional unique constraints.Hannes Ljungberg2021-12-062-1/+24
| | | | | | Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa. Thanks Hervé Le Roy for the report.
* Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal2021-07-151-15/+0
| | | | | | django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.Mariusz Felisiak2021-01-141-2/+2
|
* Fixed #31596 -- Changed ForeignKey.validate() to use the base manager.Jon Dufresne2020-06-252-0/+16
|
* Removed unused __str__() methods in tests models.Author: Mads Jensen2020-04-151-3/+0
| | | | | Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
* Fixed #29979, Refs #17337 -- Extracted AutoField field logic into a mixin ↵Nick Pope2019-08-201-1/+4
| | | | | | | | | | | 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.
* Fixed #30400 -- Improved typography of user facing strings.Jon Dufresne2019-06-281-17/+17
| | | | Thanks Claude Paroz for assistance with translations.
* Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette2018-11-271-2/+3
|
* Switched TestCase to SimpleTestCase where possible in Django's tests.Tim Graham2018-11-274-9/+12
|
* Fixed #29227 -- Allowed BooleanField to be null=True.Tim Graham2018-03-201-0/+4
| | | | Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
* Added model name to AutoField error message.Almad2018-03-031-1/+1
|
* Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak2017-12-281-1/+1
|
* Fixed #28893 -- Removed unnecessary dict.items() calls.Tim Graham2017-12-061-1/+1
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-1/+1
|
* Refs #23919 -- Removed str() conversion of type and method __name__.Simon Charette2017-01-191-1/+1
|
* Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz2017-01-181-2/+0
|
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-185-11/+0
|
* Replaced use of TestCase.fail() with assertRaises().Tim Graham2016-06-281-12/+7
| | | Also removed try/except/fail antipattern that hides exceptions.
* Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne2016-06-161-1/+1
|
* Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for ↵Loïc Bistuer2016-04-222-2/+16
| | | | form/model fields.
* Fixed E128 flake8 warnings in tests/.Tim Graham2016-04-084-64/+64
|
* Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella2015-07-271-3/+13
| | | | ForeignKey/OneToOneField
* Fixed #24708 -- Handled non-string values in GenericIPAddressField.to_python()Pradeek2015-05-061-0/+9
|
* Fixed #24714 -- Used more specific assertions than assertEqual in tests.Alasdair Nicol2015-04-282-4/+4
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-5/+8
|
* Fixed typos using https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-031-1/+1
|
* Fixed #22935 -- Changed ForeignKey.default_error_messages['invalid'] to ↵Anubhav Joshi2014-07-022-1/+7
| | | | | | refer to correct field. Thanks Tim Graham for suggestion and review.
* Fixed #22539 -- Copied exclude argument in Model.full_clean() to prevent ↵Yehonatan Daniv2014-05-012-2/+9
| | | | side effects.
* Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee2014-01-201-5/+0
| | | | | | | | | 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.
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-2/+2
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Deborgified the app cache.Aymeric Augustin2013-12-171-2/+2
| | | | | | | | | | | | | 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.
* Moved the new app cache inside core.Aymeric Augustin2013-12-171-1/+1
|
* Moved django.db.models.loading to django.apps.cache.Aymeric Augustin2013-12-171-1/+1
| | | | This commit doesn't contain any code changes; it's purely a refactoring.
* Fixed #21555 -- Made ValidationError pickable.Loic Bistuer2013-12-071-0/+41
| | | | Thanks trac username zanuxzan for the report and original patch.
* Fixed #21469 -- Allow set objects in Meta.unique_together.Baptiste Mispelon2013-11-201-1/+35
| | | | Thanks to Tim for the review.
* Fixing E302 ErrorsJason Myers2013-11-023-1/+16
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fix all violators of E231Alex Gaynor2013-10-262-4/+4
|
* Start attacking E231 violationsAlex Gaynor2013-10-241-5/+5
|
* Fixed E225 pep8 warnings.Tim Graham2013-10-231-1/+1
|
* Fixed E221 pep8 warnings.Tim Graham2013-10-221-1/+1
|
* Removed unused local variables in tests.Tim Graham2013-10-191-3/+3
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-2/+2
|
* Whitespace cleanup.Tim Graham2013-10-103-3/+0
| | | | | | | * Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
* Removed most of absolute_import importsClaude Paroz2013-07-294-5/+3
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Stopped using django.utils.unittest in the test suite.Aymeric Augustin2013-07-012-2/+3
| | | | Refs #20680.
* Fixed #20594 -- Add validation to models.SlugField.Baptiste Mispelon2013-06-132-1/+6
| | | | Thanks carbonXT for the report.