On Fri, Mar 6, 2009 at 5:54 AM, madhav <[email protected]> wrote:
>
> I will be frequently running testcases for my django project. But one
> fine day it occured to me that django actually checks the
> settings.DATABASE_NAME db actual existence while running testcases.
> Why is this so. All I thought was django will be taking the
> settings.DATABASE_NAME and creates a test db called 'test_' +
> settings.DATABASE_NAME. It also checks whether the database with the
> name = settings.DATABASE_NAME, is actually existing or not(for
> creating the test db)? Ideally speaking, only name should be checked
> but not the actual existence of the db right?

No. If you dig into the code, you will see the reason - it's all about
permissions. Django needs a valid database connection in order to
create the new test database. Django uses a connection to the normal
database as the way to create the test database. Once the test
database is created, it uses the test database; it then uses the
normal database to destroy the test database at the end of the day.

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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to