On Tue, Oct 4, 2011 at 2:28 PM, msbuck <mbuckn...@usgs.gov> wrote:
> Below is the settings. I am fairly new to python unit testing so my
> understanding of things could be better. But right now, if I select
> Run As -> Python Unit Test will my project is selected, it runs all of
> my Django tests and clobbers my working db as a result. The test
> runner also appears to be ignoring my @skipUnless decorators that
> should prevent db tests from running if settings.IS_TEST is set to
> False. I'm getting frustrated again!

I haven't used PyDev, but I would imagine it's probably importing the
management commands and running them programmatically, rather than
simply trying to run manage.py.  That would explain why your IS_TEST
is False.  According to the docs, PyDev has a DJANGO_SETTINGS_MODULE
variable.  I suggest setting that to an alternate settings.py that
contains your test settings.

I still can't see any reason why the tests would be flushing your
tables, though.  Does it happen when you issue manage.py test (using
the oracle backend) as well, or only from PyDev?  Could there be
something in your app tests that might be causing the flush?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to