About Live Server Tests in DEBUG Mode
By default LiveServerTestCase
runs in DEBUG = False
mode, even if you have DEBUG = True
in the test settings. To override that, use the @override_settings
decorator:
from django.test import LiveServerTestCase
from django.test import override_settings
@override_settings(DEBUG=True)
class RegistrationTest(LiveServerTestCase):
# …
Tips and Tricks Programming Testing Django 5.x Django 4.2 Django 3.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.