Skip to content

Disabling toolbar when settings.TEST seems problematic #270

@phill-tornroth

Description

@phill-tornroth

I was tripped up by the change made here:

#167

At issue is that the toolbar doesn't display if settings.TEST is truthy. Is it idiomatic to use settings.TEST to indicate that we're running unit tests? I happen to have used TEST to mean something else, and UNIT_TESTING to mean I'm running unit tests. It would be nice for Django to give us a documented settings flag for doing this (assuming I'm not missing something silly and TEST is that.. in which case this issue is totally misguided). However, if settings.TEST isn't a setting documented and supported by Django, I find the toolbar using it to suppress the middleware kind of awkward and mysterious. Seems like an exercise best left to the users (who can leave out the middleware during test runs pretty easily).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions