diff -r ee985e6cf9f1 tests/modeltests/model_forms/models.py
a
|
b
|
|
1285 | 1285 | >>> form = ExplicitPKForm({'key': u'key1', 'desc': u''}) |
1286 | 1286 | >>> form.is_valid() |
1287 | 1287 | False |
1288 | | >>> form.errors |
1289 | | {'__all__': [u'Explicit pk with this Key and Desc already exists.'], 'key': [u'Explicit pk with this Key already exists.'], 'desc': [u'Explicit pk with this Desc already exists.']} |
| 1288 | >>> sorted(form.errors.items()) |
| 1289 | [('__all__', [u'Explicit pk with this Key and Desc already exists.']), ('desc', [u'Explicit pk with this Desc already exists.']), ('key', [u'Explicit pk with this Key already exists.'])] |
1290 | 1290 | |
1291 | 1291 | # Choices on CharField and IntegerField |
1292 | 1292 | >>> class ArticleForm(ModelForm): |