Friday, April 29, 2011

Re: can't create test (secondary) database

On Fri, Apr 29, 2011 at 1:16 PM, Shawn Milochik <shawn@milochik.com> wrote:
> This doesn't help if the same host is being used, but you can get around
> this by creating a second settings file and using it during your tests.

thanks, i forgot that option.

i'm using that to override the engine of the oracle database, turning
to SQLite during test. unfortunately, since my legacy models have a
managed=False setting, they're not created in the test database.

for now, i added some preparation code that overrides that setting, to
ensure that all the tables are created for testing. it's _very_ ugly,
but not much worse than some mocking code i've seen.

--
Javier

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

No comments:

Post a Comment