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', '[email protected]')
  )
  # 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', '[email protected]')
  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 [email protected].
To post to this group, send email to [email protected].
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/52F527C8.8070805%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to