summaryrefslogtreecommitdiff
path: root/tests/modeltests/validation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/validation')
-rw-r--r--tests/modeltests/validation/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modeltests/validation/models.py b/tests/modeltests/validation/models.py
index a9a3d3f485..1066faca4f 100644
--- a/tests/modeltests/validation/models.py
+++ b/tests/modeltests/validation/models.py
@@ -146,4 +146,8 @@ u'john@example.com'
>>> p.validate()
{'email': ['Enter a valid e-mail address.']}
+# Make sure that Date and DateTime return validation errors and don't raise Python errors.
+>>> Person(name='John Doe', is_child=True, email='abc@def.com').validate()
+{'favorite_moment': ['This field is required.'], 'birthdate': ['This field is required.']}
+
"""}