On 8/9/07, Chris Green <[EMAIL PROTECTED]> wrote:
>
>  1)  initial_data has bitten me not realizing it was synced in
> production each time.  I think that initial_data should only get
> inserted if you have an empty new database.  Perhaps things synced
> each time should be called "constant_data".  The fixtures
> documentation in testing does say it gets synched each time but also
> says its purpose is to populate the initial empty new database.

There is an argument to be made that initial_data for a model should
only be loaded once - when the model is added to the database. I can't
say I've been bitten by this problem myself, but I'm happy to
entertain discussion/patches that address the issue.

> 2) Setting up users/groups/users manually in the runner gets blown
> away by the TestCase architecture.  Works as documented.  However, I'm
> not sure where I should put things that should happen post-each syncdb
> for testing only.  Should there be a testrunner function that gets
> called post each sync or should I create a single TestCase derived
> from django.test.TestCase that does the "pre-setup"?

I'm not sure I follow. TestCase goes out of its way to avoid
interfering with setUp/tearDown methods, and in a TestCase, there is a
complete flush after each test, so any setup would need to be rerun on
a per-test basis, not a per-sync basis. Can you provide an example of
the problem?

> 3) DateTime serialization won't work if the date is before 1901 - I
> have a bug/real life data set where I get some bogus dates out of
> another system.   This is really a python problem.

Again, if you can provide an example, it would help. However, if the
problem is with Python itself, there's not a great deal we can do.

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