Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8752 closed (fixed)

auth password tests fail on non-english sites

Reported by: Koen Biermans <koen.biermans@…> Owned by: nobody
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The password tests in the contrib.auth app rely on a specific string to be in the output, but if the LANGUAGE_CODE setting is not english, those strings will appear translated in the output, causing the tests to fail.

Attachments (1)

auth_tests.diff (1.5 KB) - added by Koen Biermans <koen.biermans@…> 8 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by Koen Biermans <koen.biermans@…>

Attachment: auth_tests.diff added

comment:1 Changed 8 years ago by Koen Biermans <koen.biermans@…>

Has patch: set

The attached patch temporarily overrides LANGUAGES and LANGUAGE_CODE in the auth tests so that english is used as expected by the output.

comment:2 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:3 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:4 Changed 8 years ago by boxed

So when will this change be committed? It's quite annoying to see all these bogus fails in the unit test output all the time.

comment:5 Changed 8 years ago by Russell Keith-Magee

milestone: 1.1

comment:6 Changed 8 years ago by Jacob

I can't reproduce this failure; I have:

    LANGUAGES = (('fr', 'French'),)
    LANGUAGE_CODE = 'fr'

in my settings file, and I don't get any failures.

comment:7 Changed 8 years ago by Malcolm Tredinnick

Jacob, you also need to have the LocaleMiddleware involved for the automatic translations to have an effect on the tests, so it's more likely to be noticed when testing "auth" as part of an installed set of applications than when testing core.

comment:8 Changed 8 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [10599]) Fixed #8752 -- Fixed django.contrib.auth tests to be locale-independent.

Patch from Koen Biermans.

comment:9 Changed 8 years ago by Malcolm Tredinnick

(In [10600]) [1.0.X] Fixed #8752 -- Fixed django.contrib.auth tests to be locale-independent.

Patch from Koen Biermans.

Backport of r10599 from trunk.

comment:10 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top