I'm sorry, please disregard this email. I found the answer in the documentation.
On 14-02-07 10:36 AM, Rosemary McCloskey wrote:
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', 'rmcclosk.m...@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', 'rmcclosk.m...@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
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/52F52D30.5090009%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.