Skip to content

Commit

Permalink
dummy test
Browse files Browse the repository at this point in the history
  • Loading branch information
dulmandakh committed Sep 17, 2024
1 parent 5e9684f commit f38d74c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/test_login_not_required.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import unittest
import django

from django.test import SimpleTestCase, override_settings
from django.urls import reverse


@unittest.skipIf(django.VERSION < (5, 1),
"Django below 5.1 is not supported login_not_required")
class LoginNotRequiredTestCase(SimpleTestCase):
@override_settings(
MIDDLEWARE=[
"django.contrib.messages.middleware.MessageMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.auth.middleware.LoginRequiredMiddleware",
"debug_toolbar.middleware.DebugToolbarMiddleware",
]
)
def test_login_not_required(self):
raise Exception("Django 5.1")
# render_panel
# self.client.get(reverse('dj'))
# DEBUG_TOOLBAR_CONFIG = {
# # Django's test client sets wsgi.multiprocess to True inappropriately
# "RENDER_PANELS": False,
# # IS_RUNNING_TESTS must be False even though we're running tests because we're running the toolbar's own tests.
# "IS_RUNNING_TESTS": False,
# }

0 comments on commit f38d74c

Please sign in to comment.