#17947 closed Bug (fixed)
tests do not change language back after fail
Reported by: | Owned by: | Claude Paroz | |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | 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
Currently if django management command have error, it calls sys.exit() and after that changes language to previous.
If I run command it is ok – no code executes after sys.exit, but ChangepasswordManagementCommandTestCase? catches SystemExit? exception and continues execution. And all tests after it have incorrect settings. Solution is to use finally to fix this code.
Attachments (1)
Change History (6)
by , 13 years ago
Attachment: | django-tests-lang.patch added |
---|
comment:1 by , 13 years ago
Cc: | removed |
---|---|
Owner: | changed from | to
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Yes, this test previously worked with broken locale and after locale fix it will crash if project uses different language
Note:
See TracTickets
for help on using tickets.
Andrey, is the contrib.auth test change required to fix the bug?