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

drupal - using views argument in the view tpl.php file -

php - Posting PHPBB Forum Thread/Post info in a website -

php - Add a blog by sending a mail to a certain emailadress -