summaryrefslogtreecommitdiff
path: root/tests/test_client
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-10-26 00:02:38 -0700
committerGitHub <noreply@github.com>2020-10-26 08:02:38 +0100
commitb2717c7532cd35ab9e80c92c6b9f070e62e7ae88 (patch)
tree9ea04d937cd07a331ec0247e1b74b94f0d33489f /tests/test_client
parent2b56c566532c17dab4916a5a60e4db24a07eaa1a (diff)
downloaddjango-b2717c7532cd35ab9e80c92c6b9f070e62e7ae88.tar.gz
Simplifed formset iteration using enumerate().
Diffstat (limited to 'tests/test_client')
-rw-r--r--tests/test_client/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_client/views.py b/tests/test_client/views.py
index 38fbeae797..3ac0e57976 100644
--- a/tests/test_client/views.py
+++ b/tests/test_client/views.py
@@ -237,8 +237,7 @@ class BaseTestFormSet(BaseFormSet):
return
emails = []
- for i in range(0, self.total_form_count()):
- form = self.forms[i]
+ for form in self.forms:
email = form.cleaned_data['email']
if email in emails:
raise ValidationError(