On Wed, Dec 31, 2008 at 7:08 AM, Bo Shi <bs1...@gmail.com> wrote:
>
> Hi,
>
> One of our django applications does not use django's ORM.  Is there a
> way to run
>
> ./manage.py test my_app
>
> Such that it does not perform test database setup?

There are two ways that you could do this.

The first would be to define a custom test runner that skipped the
database setup phase. django/test/simple/run_tests() will give you a
model for what needs to be in a test runner; take a copy of this
method (removing the database setup portions) and follow the
instructions in [1]

The second approach would be to define a dummy database backend that
didn't complain about a database not being defined.
django/db/backends/dummy gives you a starting point for this.

Either way, you will need to make changes to your settings file.
Neither of these approaches will fall in to the "if I'm only testing
my_app, don't bother setting up the database, otherwise set up the
database as normal" category.

[1] 
http://docs.djangoproject.com/en/dev/topics/testing/#using-different-testing-frameworks

Yours
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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