Re: multi_db support for doctests? How to enable?

2010-08-05 Thread Reinout van Rees
On 08/05/2010 07:27 AM, Xavier Ordoquy wrote: I'll do some experimenting with django versions. I clearly remember adding code to my router to allow django to create those 5 tables in my second database, so it *did* work. Perhaps 1.2.1 broke something that 1.2betasomething did right? Gotta

Re: multi_db support for doctests? How to enable?

2010-08-04 Thread Xavier Ordoquy
Hi, >> So far, the only issue I found with testing on multi database is that django >> 1.2 expects all the tables are created on the second database which may not >> always be the case (bug reported, I just uploaded a patch for that). > > Which patch/ticket is that? With my router, the second

Re: multi_db support for doctests? How to enable?

2010-08-04 Thread Reinout van Rees
On 08/04/2010 06:08 PM, Xavier Ordoquy wrote: The second database should be created. Maybe you want to double check you setup a database router. I *do* have a database router. The router makes sure that 5 tables end up in the second database (and the others end up in the default database).

Re: multi_db support for doctests? How to enable?

2010-08-04 Thread Xavier Ordoquy
Hi, The second database should be created. Maybe you want to double check you setup a database router. You also want to take care to fixture file name which expects you to add the database name in the file name. So far, the only issue I found with testing on multi database is that django 1.2 e

Re: multi_db support for doctests? How to enable?

2010-08-04 Thread Reinout van Rees
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 datab

Re: multi_db support for doctests? How to enable?

2010-08-04 Thread Russell Keith-Magee
On Wed, Aug 4, 2010 at 6:40 PM, Reinout van Rees wrote: > Hi, > > http://docs.djangoproject.com/en/dev/topics/testing/#multi-database-support > tells me to add "multi_db = True" to my unittest TestCase class to get multi > db support. > > I'm using a doctest, however, and I can't figure out how to

multi_db support for doctests? How to enable?

2010-08-04 Thread Reinout van Rees
Hi, http://docs.djangoproject.com/en/dev/topics/testing/#multi-database-support tells me to add "multi_db = True" to my unittest TestCase class to get multi db support. I'm using a doctest, however, and I can't figure out how to set that for my doctest. Anyone know how to get that working?