I like django unit tests, cause they create and drop test database on run.
What ways to create test database for tornado exists?
UPD: I’m interested in postgresql test database creation on test run.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found the easiest way is just to use a SQL dump for the test database. Create a database, populate it with fixtures, and write it out to file. Simply call
load_fixturesbefore you run your tests (or whenever you want to reset the DB). This method can certainly be improved, but it’s been good enough for my needs.