I'm having a chicken-and-egg problem.

So, I want to drop the test database, recreate it, sync it to the  
models, and then populate it with test data, ideally automatically  
because automatic tests are far more likely to get run.

If I want the drop and create commands to be generic, they need  
access to the current DATABASE_NAME, so they have to be called while  
the server or shell is running so that they pick up any --settings=  
options from the command line and know which database to use.

But then I have to run syncdb, which I can't figure out how to run  
under program control. Well, I can, but it prints out all the stuff  
it would print if it was called on the command line and stops to ask  
if I want to create a superuser, which is kind of annoying in the  
middle of a test script.

And then I need to be running under program control again to add all  
my test data to the the db.

Please tell me that I'm overthinking this and there's some easy way  
out of this!

Thanks,
Todd

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to