Opened 13 years ago

Closed 13 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: dev
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

Description

Failure
Traceback (most recent call last):

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

testMethod()

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

self.fail_login()

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

self.assertContainsEscaped(response, AuthenticationForm.error_messagesinvalid_login)

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

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

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

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

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

raise self.failureException(msg)

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

Change History (4)

comment:1 by anonymous, 13 years ago

Component: Uncategorizedcontrib.auth
Type: UncategorizedBug

comment:2 by Claude Paroz, 13 years ago

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

Strango, but it works with latest django commit

comment:4 by anonymous, 13 years ago

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