79441061

Date: 2025-02-15 06:32:12
Score: 1
Natty:
Report link

Here is what I do. You must have a test database in your 'default' database configuration for this to work, I guess.

def is_test():
    import django.core.management
    db = django.core.management.settings.DATABASES["default"]
    return db["NAME"] == db["TEST"]["NAME"]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: polysoul52