summaryrefslogtreecommitdiff
path: root/tests/expressions
diff options
context:
space:
mode:
authorKeryn Knight <keryn@kerynknight.com>2022-01-03 11:29:24 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-01-04 05:51:00 +0100
commit0ed2919814c80e31626dffdb6b80d0c20d43452f (patch)
treebf8784b8289214e109ff54e31a17a1d42e38fe68 /tests/expressions
parentb894199eb08d9162e70f7115f91e1e9d2030fc9f (diff)
downloaddjango-0ed2919814c80e31626dffdb6b80d0c20d43452f.tar.gz
Fixed #33406 -- Avoided creation of MaxLengthValidator(None) when resolving Value.output_field for strings.
This brings the behaviour in line with Field subclasses which append to the validators within __init__(), like BinaryField, and prevents the creation of a validator which incorrectly throws a TypeError, if it were used.
Diffstat (limited to 'tests/expressions')
-rw-r--r--tests/expressions/tests.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
index b622c3a9aa..9fd31d550c 100644
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -1859,6 +1859,7 @@ class ValueTests(TestCase):
and this demonstrates that they don't throw an exception.
"""
value_types = [
+ 'str',
True,
42,
3.14,