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)
comment:6 Changed 5 years ago by
|Status:||closed → reopened|
|Triage Stage:||Unreviewed → Design decision needed|