diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-08 12:09:55 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:15:38 +0100 |
| commit | 6a682b38e75d4c975b4c4493565a59f1bc14397c (patch) | |
| tree | 0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/forms_tests/widget_tests/test_passwordinput.py | |
| parent | e73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff) | |
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
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">', ) |
