Hello,
I am trying to run unit tests on my project, and the DEBUG setting is not being preserved during the tests. I'm using Django 1.6.1, with Python 2.7.3 on Ubuntu 12.04.
My settings file looks like this:
DEBUG = True
ADMINS = (
('Rosemary McCloskey', '
rmcclo...@gmail.com')
)
# more stuff
I made a tests file called "metadata/tests.py", with the following contents:
from django.conf import settings
print(settings.ADMINS)
print(settings.DEBUG)
It prints out:
('Rosemary McCloskey', '
rmcclo...@gmail.com')
False
So for some reason, the DEBUG setting is not being preserved during testing, but all the other settings are (I have also tried printing out settings.DATABASES and settings.INSTALLED_APPS, and they are preserved). Is this normal Django behaviour? I couldn't find any reference to it in the docs. Do you have any ideas about how I could get around this (the code has some conditional imports based on DEBUG and I don't want to remove them)?
Thanks for your help,
Rosemary