On 5/22/07, jararaca <[EMAIL PROTECTED]> wrote:
>
> A short while ago I had my unit tests up and running, including
> reading some objects from a fixture. Today I've tried to run the tests
> again (calling 'manage.py test' just as I did before). Now the test
> database is created as I can see using the MySQL Frontend, but the
> objects from the fixture never show up there - in spite of the command
> line output telling me they have been installed. Furthermore I get
> lots of errors like "Failed to install index for ... 'Duplicate key
> name...'".

The only cause I can think of for this level of confusion would be a
stray settings file somewhere. The settings file is just another
python file; if there are multiple settings.py files on your
PYTHONPATH, you could get data put into unexpected databases, etc.

> But the strangest part is yet to come: When testing, it is obviously
> always my "real" database that is being read, not the 'test_xy'
> database, even if I change DATABASE_NAME in settings!

I have no idea why it would write to the real database, unless your
stray settings file contained a TEST_DATABASE_NAME value that was the
same as your DATABASE_NAME.

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-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to