On 30 nov. 2011, at 23:26, Adrian Holovaty wrote:

> On Wed, Nov 30, 2011 at 4:22 PM, Jeremy Dunck <jdu...@gmail.com> wrote:
>>   1) expand on the testing guide to present fixtures as one option
>> for test data and point out the options to script fixture generation
>> or avoiding fixtures in favor of TestCase-called generation,
>> discussing tradeoffs in the approaches
> 
> I would support this. Seems like good documentation to have.

I agree that we should suggest alternatives to fixtures, and I think we should 
emphasize object generation rather than fixture scripting.

Object generation is vastly simplified with factories, since they take care of 
creating automatically dependent instances (non-nullable foreign keys). 
Factories are also easier to keep in sync with model changes than fixtures.

In my current job we're using https://github.com/rbarrois/factory_boy, we've 
dropped all but the most trivial fixtures (sites, languages, an admin user), 
and we haven't looked back.

Best regards,

-- 
Aymeric Augustin

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

Reply via email to