Skip to: Site menu | Main content



Splitting Django Models Into Separate Files

A little while ago I wrote a post about getting Django unittests to work on DreamHost. The particular problem with the DreamHost setup is that they don’t allow you to programmatically create and drop databases and the default Django unittest behaviour is to do just that: create a brand new test db, use it and [...]

Django Unittesting on Dreamhost

The default test behaviour for a Django site creates and then destroys a whole test database on each test run. Normally this is not a problem, but the way Dreamhost has their MySQL setup running, the commands to create and drop databases are not available outside of their administration panel. What follows is the solution I have come up with and am currently using to run Django unittests with my Dreamhost MySQL databases.