python - Changing the active database in django -


i'm writing testing application i'm using test rest of code base. i'd able when test using manage.py command, automatically change logging different database. there way this?

django automatically creates , drops test database you. unless otherwise specified (we'll see how in second) test_ + <the name of database in settings file>. if settings uses database foo, tests executed against test_foo. no configuration changes needed this.

if wish execute tests against custom database (rather test_foo) can tweaking test_name setting. can add test_name each dictionary in databases.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -