Ticket #13316: forms_test.patch

File forms_test.patch, 1.1 KB (added by lasko, 5 years ago)

patch for django/contrib/auth/tests/forms.py

  • django/contrib/auth/forms.py

    diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
    index 086acf3..10012b0 100644
    a b class AuthenticationForm(forms.Form): 
    5858    username/password logins.
    5959    """
    6060    username = forms.CharField(label=_("Username"), max_length=30)
    61     password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
     61    password = forms.CharField(label=_("Password"), widget=forms.PasswordInput(render_value=False))
    6262
    6363    def __init__(self, request=None, *args, **kwargs):
    6464        """
  • django/contrib/auth/tests/forms.py

    diff --git a/django/contrib/auth/tests/forms.py b/django/contrib/auth/tests/forms.py
    index b691c56..c08a5aa 100644
    a b False 
    8888>>> form.non_field_errors()
    8989[u'Please enter a correct username and password. Note that both fields are case-sensitive.']
    9090
     91# Check that the invalid password does not render
     92>>> print form['password']
     93<input type="password" name="password" id="id_password" />
     94
    9195# The user is inactive.
    9296
    9397>>> data = {
Back to Top