summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/model_forms/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py
index dd6e25f716..e3821de758 100644
--- a/tests/modeltests/model_forms/models.py
+++ b/tests/modeltests/model_forms/models.py
@@ -1192,6 +1192,14 @@ False
>>> form._errors
{'__all__': [u'Price with this Price and Quantity already exists.']}
+>>> class PriceForm(ModelForm):
+... class Meta:
+... model = Price
+... exclude = ('quantity',)
+>>> form = PriceForm({'price': '6.00'})
+>>> form.is_valid()
+True
+
# Choices on CharField and IntegerField
>>> class ArticleForm(ModelForm):
... class Meta: