On Thu, Jul 29, 2010 at 6:02 PM, Xavier Ordoquy <xordo...@linovia.com> wrote: > Hi there. > > I'm currently working on a project where I use a legacy database with a > django one. > I've setup the multi database support and it seems to work pretty well. > However, I'm getting an issue with testing. > > I need a fixture to load data to both the legacy and Django's databases. > In order to make this work, I found that I needed to set the multi_db to True > in my TestCase (otherwise the legacy database data aren't loaded). > > However, if I do that, it turns out that Django will throw an exception > complaining about django_site not existing on my legacy database and would > stop tests.
I suspect that this might be an artefact of #14025. The flush command was being a little too exuberant about the post-syncdb signals it was emitting; since sites are created by a post-syncdb signal, and overenthusiastic post-syncdb signal could be causing problems. I've fixed the problem with flush in r13466 (and fixed the fix in r13472); can you try a trunk checkout and let me know if it solves your problem? > I also noticed some weird behavior with the initial data. > My initial_data load fine while the test framework works on the django > database but it will complains about corrupted file while creating the legacy > database (whether or not my testcase has the mult_db set). Can you show the error message? I can't say this rings any bells for me. Yours, Russ Magee %-) -- 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.