﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14339	Enable testing when you can't create/destroy databases	Martin Omander <martin.omander@…>	nobody	"When you are using Django in a hosted environment, you don't always have privileges to ""CREATE DATABASE"" or ""DROP DATABASE"". Some services allow you to create and destroy databases, but only through a web UI and not from Python code. In either case, you can't run Django unit tests. Developers using Webfaction, like myself, are in this situation. See [http://forum.webfaction.com/viewtopic.php?id=3592 this forum thread] for developers struggling with this problem.

I hacked my local _create_test_db() and _destroy_test_db() so they assume the test database exists and create and drop tables, instead of the entire database. This allows me to run unit tests, but at the cost of forking the Django code. If there was a new test runner that did the same thing, others who are on hosting services like Webfaction would be able to do testing without having to invent dirty hacks like I did. This new test runner would need to call new code in django/db/backends/creation.py that drops all tables in a database.

Is a new test runner the right approach to solve this problem? Are there other approaches? Would this warrant a new method in creation.py to drop all tables in a database?
"		closed	Testing framework	1.2		duplicate	test database		Unreviewed	0	0	0	0	0	0
