About Skipping Test Cases
You can skip test cases based on settings with the @unittest.skipIf
decorator:
import unittest
from django.test import LiveServerTestCase
from django.conf import settings
@unittest.skipIf(
not settings.IS_FEATURE_X_ACTIVE,
"Skipping tests for feature X."
)
class FeatureXTest(LiveServerTestCase):
...
Tips and Tricks Programming Testing Django 4.2 Django 3.2 Django 2.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You