On 08/04/2010 01:49 PM, Russell Keith-Magee wrote:

Doctests don't do any database flushing, so there is no analog for the
multi-db flag. Just make your calls on the database as you normally
would.

Ah, ok.

Then I'm doing something else wrong (I've only got doctests right now): my second database isn't created by the test mechanism. I added a regular unittest with the multi_db=True, but that also didn't result in a second database.

The code *does* use the regular database (sqlite, if available), but it doesn't create a test database like it does for the default database.

The relevant part from my testsettings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.spatialite',
        'NAME': 'test.db',
        },
    'fews-unblobbed': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'testunblobbed.db',
        }
    }

No special options, I'd say. The test database *used* to get created when I last ran the tests a few weeks ago, now that I think about it. I'll have to do some more debugging.


Reinout


--
Reinout van Rees - rein...@vanrees.org - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to