Code

Ticket #10103: fix_model_form_doctest_with_dict_literal.diff

File fix_model_form_doctest_with_dict_literal.diff, 818 bytes (added by leosoto, 5 years ago)
Line 
1diff -r ee985e6cf9f1 tests/modeltests/model_forms/models.py
2--- a/tests/modeltests/model_forms/models.py    Tue Jan 20 01:42:18 2009 -0300
3+++ b/tests/modeltests/model_forms/models.py    Thu Jan 22 21:26:41 2009 -0300
4@@ -1285,8 +1285,8 @@
5 >>> form = ExplicitPKForm({'key': u'key1', 'desc': u''})
6 >>> form.is_valid()
7 False
8->>> form.errors
9-{'__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.']}
10+>>> sorted(form.errors.items())
11+[('__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.'])]
12 
13 # Choices on CharField and IntegerField
14 >>> class ArticleForm(ModelForm):