Tests for contrib.auth fail if login signals use templates
|Reported by:||jMyles||Owned by:||jMyles|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The tests for contrib.auth override settings.TEMPLATE_DIRS in order to use the test templates, which are obviously required in order to have cognizable tests of the login system.
However, if a project uses the user_logged_in signal to hook a function that uses django.template.loader.get_template(), the test will improperly raise TemplateDoesNotExist.
Instead of ovverriding settings.TEMPLATE_DIRS, it makes more sense to simply create a new tuple, the first member of which is the location of the test templates.
Change History (15)
Changed 2 years ago by jMyles
comment:1 Changed 2 years ago by julien
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:6 Changed 2 years ago by aaugustin
- Resolution wontfix deleted
- Status changed from closed to reopened
- Triage Stage changed from Unreviewed to Design decision needed
comment:11 Changed 12 months ago by aaugustin
- Triage Stage changed from Design decision needed to Accepted