How to make django test framework read from live database?

Posted by lfborjas on Stack Overflow See other posts from Stack Overflow or by lfborjas
Published on 2010-06-14T00:43:45Z Indexed on 2010/06/14 0:52 UTC
Read the original article Hit count: 227

Filed under:
|
|

I realize there's a similar question here, but this one has a different approach: I have a django app that does queries over data indexed with djapian ; I'd like to write unit tests for this app's search component, and, obviously, I'd need the django settings module and all connections with the database active, so the test runner that django provides seems ideal. however, the django testing framework creates a dummy database and I'd hate to dump all my data to a fixture and then index it (the tests would take forever!);

My data isn't at risk because the tests would only read from the database, so, how could this be achieved? -I'm new at this whole unit testing thing, so the solution of writing a new test runner I read in that similar question doesn't enlighten me a bit, at least not without some details

© Stack Overflow or respective owner

Related posts about python

Related posts about django