diff options
| author | Tim Graham <timograham@gmail.com> | 2016-04-03 20:37:32 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-04 17:14:26 -0400 |
| commit | 2cd2d188516475ddf256e6267cd82c495fb5c430 (patch) | |
| tree | 1a7c3c167c1576923c7c4f5544495face5bd7327 /tests/forms_tests | |
| parent | d356bb653f4d90ae9809e5a051791ded39010c38 (diff) | |
Fixed W503 flake8 warnings.
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/tests/test_forms.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index 22675bb84b..99bcfe3417 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -941,8 +941,8 @@ value="Should escape < & > and <script>alert('xss')</ password2 = CharField(widget=PasswordInput) def clean_password2(self): - if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') - and self.cleaned_data['password1'] != self.cleaned_data['password2']): + if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') and + self.cleaned_data['password1'] != self.cleaned_data['password2']): raise ValidationError('Please make sure your passwords match.') return self.cleaned_data['password2'] @@ -980,8 +980,8 @@ value="Should escape < & > and <script>alert('xss')</ def clean(self): # Test raising a ValidationError as NON_FIELD_ERRORS. - if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') - and self.cleaned_data['password1'] != self.cleaned_data['password2']): + if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') and + self.cleaned_data['password1'] != self.cleaned_data['password2']): raise ValidationError('Please make sure your passwords match.') # Test raising ValidationError that targets multiple fields. @@ -1120,8 +1120,8 @@ value="Should escape < & > and <script>alert('xss')</ password2 = CharField(widget=PasswordInput) def clean(self): - if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') - and self.cleaned_data['password1'] != self.cleaned_data['password2']): + if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') and + self.cleaned_data['password1'] != self.cleaned_data['password2']): raise ValidationError( 'Please make sure your passwords match.', code='password_mismatch', @@ -2309,8 +2309,8 @@ Password: <input type="password" name="password" /></li> password2 = CharField(widget=PasswordInput) def clean(self): - if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') - and self.cleaned_data['password1'] != self.cleaned_data['password2']): + if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') and + self.cleaned_data['password1'] != self.cleaned_data['password2']): raise ValidationError('Please make sure your passwords match.') return self.cleaned_data @@ -2369,8 +2369,8 @@ Password: <input type="password" name="password" /></li> password2 = CharField(widget=PasswordInput) def clean(self): - if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') - and self.cleaned_data['password1'] != self.cleaned_data['password2']): + if (self.cleaned_data.get('password1') and self.cleaned_data.get('password2') and + self.cleaned_data['password1'] != self.cleaned_data['password2']): raise ValidationError('Please make sure your passwords match.') return self.cleaned_data |
