diff options
Diffstat (limited to 'tests/forms_tests/widget_tests/test_passwordinput.py')
| -rw-r--r-- | tests/forms_tests/widget_tests/test_passwordinput.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/forms_tests/widget_tests/test_passwordinput.py b/tests/forms_tests/widget_tests/test_passwordinput.py index ecbe274d69..1adf0cc3cb 100644 --- a/tests/forms_tests/widget_tests/test_passwordinput.py +++ b/tests/forms_tests/widget_tests/test_passwordinput.py @@ -7,10 +7,17 @@ class PasswordInputTest(WidgetTest): widget = PasswordInput() def test_render(self): - self.check_html(self.widget, 'password', '', html='<input type="password" name="password">') + self.check_html( + self.widget, "password", "", html='<input type="password" name="password">' + ) def test_render_ignore_value(self): - self.check_html(self.widget, 'password', 'secret', html='<input type="password" name="password">') + self.check_html( + self.widget, + "password", + "secret", + html='<input type="password" name="password">', + ) def test_render_value_true(self): """ @@ -18,9 +25,15 @@ class PasswordInputTest(WidgetTest): render its value. For security reasons, this is off by default. """ widget = PasswordInput(render_value=True) - self.check_html(widget, 'password', '', html='<input type="password" name="password">') - self.check_html(widget, 'password', None, html='<input type="password" name="password">') self.check_html( - widget, 'password', 'test@example.com', + widget, "password", "", html='<input type="password" name="password">' + ) + self.check_html( + widget, "password", None, html='<input type="password" name="password">' + ) + self.check_html( + widget, + "password", + "test@example.com", html='<input type="password" name="password" value="test@example.com">', ) |
