Skip to content

Commit

Permalink
Tests: Add debug_toolbar to settings
Browse files Browse the repository at this point in the history
Debug toolbar adds details like template-context. By default Django does
not add those for the jinja backend. So the toolbar eases some testing.

see https://docs.djangoproject.com/en/4.2/topics/testing/tools/#django.test.Response.context
  • Loading branch information
chris34 committed Oct 19, 2024
1 parent 627ee2b commit 29f538c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
ADMIN_MEDIA_PREFIX = STATIC_URL + '/_admin/'
INYOKA_SYSTEM_USER_EMAIL = 'system@' + BASE_DOMAIN_NAME

# explicitly add tests.utils to apps to run unittests here
# debug toolbar adds details like template-context, django does not by default
MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',)

INSTALLED_APPS = INSTALLED_APPS + (
'tests.utils',
'tests.utils', # explicitly add tests.utils to apps to run unittests here
'debug_toolbar',
)

if os.environ.get('INYOKA_THEME') == 'theme-ubuntuusers':
Expand Down

0 comments on commit 29f538c

Please sign in to comment.