mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
unicode: Test changes that I forgot to commit in [5271].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4a7727e46e
commit
e4cd34cbee
@ -1303,9 +1303,9 @@ strict.
|
|||||||
>>> rut = CLRutField()
|
>>> rut = CLRutField()
|
||||||
|
|
||||||
>>> rut.clean('11-6')
|
>>> rut.clean('11-6')
|
||||||
'11-6'
|
u'11-6'
|
||||||
>>> rut.clean('116')
|
>>> rut.clean('116')
|
||||||
'11-6'
|
u'11-6'
|
||||||
|
|
||||||
# valid format, bad verifier.
|
# valid format, bad verifier.
|
||||||
>>> rut.clean('11.111.111-0')
|
>>> rut.clean('11.111.111-0')
|
||||||
@ -1318,13 +1318,13 @@ Traceback (most recent call last):
|
|||||||
ValidationError: [u'The Chilean RUT is not valid.']
|
ValidationError: [u'The Chilean RUT is not valid.']
|
||||||
|
|
||||||
>>> rut.clean('767484100')
|
>>> rut.clean('767484100')
|
||||||
'76.748.410-0'
|
u'76.748.410-0'
|
||||||
>>> rut.clean('78.412.790-7')
|
>>> rut.clean('78.412.790-7')
|
||||||
'78.412.790-7'
|
u'78.412.790-7'
|
||||||
>>> rut.clean('8.334.6043')
|
>>> rut.clean('8.334.6043')
|
||||||
'8.334.604-3'
|
u'8.334.604-3'
|
||||||
>>> rut.clean('76793310-K')
|
>>> rut.clean('76793310-K')
|
||||||
'76.793.310-K'
|
u'76.793.310-K'
|
||||||
|
|
||||||
Strict RUT usage (does not allow imposible values)
|
Strict RUT usage (does not allow imposible values)
|
||||||
>>> rut = CLRutField(strict=True)
|
>>> rut = CLRutField(strict=True)
|
||||||
@ -1346,7 +1346,7 @@ Traceback (most recent call last):
|
|||||||
...
|
...
|
||||||
ValidationError: [u'Enter valid a Chilean RUT. The format is XX.XXX.XXX-X.']
|
ValidationError: [u'Enter valid a Chilean RUT. The format is XX.XXX.XXX-X.']
|
||||||
>>> rut.clean('78.412.790-7')
|
>>> rut.clean('78.412.790-7')
|
||||||
'78.412.790-7'
|
u'78.412.790-7'
|
||||||
>>> rut.clean('8.334.6043')
|
>>> rut.clean('8.334.6043')
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user