summaryrefslogtreecommitdiff
path: root/tests/model_formsets
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-05-27 16:08:46 -0700
committerTim Graham <timograham@gmail.com>2017-05-27 19:08:46 -0400
commit21046e77734278cea871dce922220bf29aa5b7b4 (patch)
treee0820850a3d058c35307916da793668f7e5c48b3 /tests/model_formsets
parent2a5708a304cf337dbf556e2bd87a930079f8f766 (diff)
downloaddjango-21046e77734278cea871dce922220bf29aa5b7b4.tar.gz
Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
Diffstat (limited to 'tests/model_formsets')
-rw-r--r--tests/model_formsets/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/model_formsets/tests.py b/tests/model_formsets/tests.py
index c440631ba7..3245bb3fd9 100644
--- a/tests/model_formsets/tests.py
+++ b/tests/model_formsets/tests.py
@@ -1463,7 +1463,7 @@ class ModelFormsetTest(TestCase):
# a formset for a Model that has a custom primary key that still needs to be
# added to the formset automatically
FormSet = modelformset_factory(ClassyMexicanRestaurant, fields=["tacos_are_yummy"])
- self.assertEqual(sorted(FormSet().forms[0].fields.keys()), ['tacos_are_yummy', 'the_restaurant'])
+ self.assertEqual(sorted(FormSet().forms[0].fields), ['tacos_are_yummy', 'the_restaurant'])
def test_model_formset_with_initial_model_instance(self):
# has_changed should compare model instance and primary key