[#1117] Tests use clean_db() not delete_all()

This fixes crashes when the database was not initialized or was only
partially initialized