Opened 16 years ago

Closed 15 years ago

Last modified 12 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: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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@…> 15 years ago.

Download all attachments as: .zip

Change History (11)

by Koen Biermans <koen.biermans@…>, 15 years ago

Attachment: auth_tests.diff added

comment:1 by Koen Biermans <koen.biermans@…>, 15 years ago

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 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:3 by Jacob, 15 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Anders Hovmöller, 15 years ago

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 by Russell Keith-Magee, 15 years ago

milestone: 1.1

comment:6 by Jacob, 15 years ago

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 by Malcolm Tredinnick, 15 years ago

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 by Malcolm Tredinnick, 15 years ago

Resolution: fixed
Status: newclosed

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

Patch from Koen Biermans.

comment:9 by Malcolm Tredinnick, 15 years ago

(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 by Jacob, 12 years ago

milestone: 1.1

Milestone 1.1 deleted

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