Code

Ticket #4833: 4833_test.diff

File 4833_test.diff, 515 bytes (added by ikelly, 6 years ago)

Test case for 4833.diff

Line 
1Index: tests/modeltests/validation/models.py
2===================================================================
3--- tests/modeltests/validation/models.py       (revision 6994)
4+++ tests/modeltests/validation/models.py       (working copy)
5@@ -142,6 +142,12 @@
6 >>> p.email
7 u'john@example.com'
8 
9+>>> p = Person(**dict(valid_params, email='fred@localhost'))
10+>>> p.validate()
11+{}
12+>>> p.email
13+'fred@localhost'
14+
15 >>> p = Person(**dict(valid_params, email=22))
16 >>> p.validate()
17 {'email': [u'Enter a valid e-mail address.']}