Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed a couple form/formset deprecation warnings in tests.

Backport of a521d10 from master.
  • Loading branch information...
commit 4c1029971e810cde32ee4cd489627239b9b1b6ed 1 parent 3c51962
Tim Graham authored July 01, 2013
2  tests/model_forms/tests.py
@@ -252,10 +252,12 @@ class Meta:
252 252
         fields = '__all__'
253 253
         widgets = {'status': forms.CheckboxSelectMultiple}
254 254
 
  255
+
255 256
 class CustomErrorMessageForm(forms.ModelForm):
256 257
     name1 = forms.CharField(error_messages={'invalid': 'Form custom error message.'})
257 258
 
258 259
     class Meta:
  260
+        fields = '__all__'
259 261
         model = CustomErrorMessage
260 262
 
261 263
 
2  tests/model_formsets/tests.py
@@ -399,7 +399,7 @@ def __init__(self, *args, **kwargs):
399 399
                 super(BaseAuthorFormSet, self).__init__(*args, **kwargs)
400 400
                 self.queryset = Author.objects.filter(name__startswith='Charles')
401 401
 
402  
-        AuthorFormSet = modelformset_factory(Author, formset=BaseAuthorFormSet)
  402
+        AuthorFormSet = modelformset_factory(Author, fields='__all__', formset=BaseAuthorFormSet)
403 403
         formset = AuthorFormSet()
404 404
         self.assertEqual(len(formset.get_queryset()), 1)
405 405
 

0 notes on commit 4c10299

Please sign in to comment.
Something went wrong with that request. Please try again.