test connecting to deleted DB
Check that the file actually got created and has the expected content
Extract function to save an uploaded file as a Template
convert to subtests
extract function to connect to the database
Add methods to import and export a postgres database
The Postgres superuser account is only needed to create databases
Don't need a DB transaction here - the caller already does a transaction
Add method to save a named file into the store

Also, extracted common validation code to _validate_saved_file()
Add command to create a template file+record from a database
Allow database records to have no related template

This will allow creating a new, blank test database, not based on any
template.
Add command to create a Postgres database from its details
extract function to make a new FileStorage
When importing SQL, throw an exception if the SQL has problems
add command to create a database from a template
listing /databases works
getting info for one database works
forgot to qualify the xpath
remove breakpoint
remove unnecessary line