Opened 4 years ago

Closed 4 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 4 years ago by anonymous

  • Component changed from Uncategorized to contrib.auth
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Type changed from Uncategorized to Bug

comment:2 Changed 4 years ago by claudep

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 4 years ago by anonymous

Strango, but it works with latest django commit

comment:4 Changed 4 years ago by anonymous

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top