Opened 7 years ago

Closed 7 years ago

#17562 closed Bug (worksforme)

django.contrib.auth.tests.views.ChangePasswordTest.fail_login does not respect language

Reported by: anonymous Owned by: nobody
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Traceback (most recent call last):

File "/opt/python2.7/lib/python2.7/unittest/", line 327, in run


File "/home/teamcity/virtualenv/eksmo/src/django/django/contrib/auth/tests/", line 226, in test_password_change_succeeds


File "/home/teamcity/virtualenv/eksmo/src/django/django/contrib/auth/tests/", line 192, in fail_login

self.assertContainsEscaped(response, AuthenticationForm.error_messagesinvalid_login?)

File "/home/teamcity/virtualenv/eksmo/src/django/django/contrib/auth/tests/", line 53, in assertContainsEscaped

return self.assertContains(response, escape(force_unicode(text)), kwargs)

File "/home/teamcity/virtualenv/eksmo/src/django/django/test/", line 538, in assertContains

msg_prefix + "Couldn't find '%s' in response" % text)

File "/opt/python2.7/lib/python2.7/unittest/", line 420, in assertTrue

raise self.failureException(msg)

AssertionError: Couldn't find 'Пожалуйста, введите верные имя пользователя и пароль. Помните, оба поля чувствительны к регистру.' in response

Change History (4)

comment:1 Changed 7 years ago by anonymous

Component: Uncategorizedcontrib.auth
Type: UncategorizedBug

comment:2 Changed 7 years ago by Claude Paroz

I don't see how it can fail for you, as these tests are forcing the language to 'en' in the setUp. Could you test which is the active language during this test, and if it is 'ru', why and where the language has been reset?

comment:3 Changed 7 years ago by anonymous

Strango, but it works with latest django commit

comment:4 Changed 7 years ago by anonymous

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top