summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-01 09:36:31 -0400
committerTim Graham <timograham@gmail.com>2013-07-01 09:36:31 -0400
commita521d103227be4e5660cf7a66bf98003696aa781 (patch)
treef2c78ff41cf617d37f22dc1de2bf7330007657e5
parenta6a905c619e48bb3db4a5fbb09e5e03abb7ed0f6 (diff)
Fixed a couple form/formset deprecation warnings in tests.
-rw-r--r--tests/model_forms/tests.py2
-rw-r--r--tests/model_formsets/tests.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 9d71798b3d..09c62c5205 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -252,10 +252,12 @@ class StatusNoteCBM2mForm(forms.ModelForm):
fields = '__all__'
widgets = {'status': forms.CheckboxSelectMultiple}
+
class CustomErrorMessageForm(forms.ModelForm):
name1 = forms.CharField(error_messages={'invalid': 'Form custom error message.'})
class Meta:
+ fields = '__all__'
model = CustomErrorMessage
diff --git a/tests/model_formsets/tests.py b/tests/model_formsets/tests.py
index 43509c471f..09a3ba1778 100644
--- a/tests/model_formsets/tests.py
+++ b/tests/model_formsets/tests.py
@@ -399,7 +399,7 @@ class ModelFormsetTest(TestCase):
super(BaseAuthorFormSet, self).__init__(*args, **kwargs)
self.queryset = Author.objects.filter(name__startswith='Charles')
- AuthorFormSet = modelformset_factory(Author, formset=BaseAuthorFormSet)
+ AuthorFormSet = modelformset_factory(Author, fields='__all__', formset=BaseAuthorFormSet)
formset = AuthorFormSet()
self.assertEqual(len(formset.get_queryset()), 1)