From 2cd2d188516475ddf256e6267cd82c495fb5c430 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sun, 3 Apr 2016 20:37:32 -0400 Subject: Fixed W503 flake8 warnings. --- tests/forms_tests/tests/test_forms.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/forms_tests') 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: 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: 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 -- cgit v1.3