[TIP] What are you all using for fixtures?

Chris Wesseling Chris.Wesseling at cwi.nl
Thu Jul 3 09:28:41 PDT 2014


On 2014-07-03T11:48:08+0000, Marcin Tustin wrote:
> Right now I'm looking for alternatives to the farmdev fixture module
> (http://farmdev.com/projects/fixture/) for loading fixture data with
> sqlalchemy.
[...]
> What are you using, and why do you like or dislike it?

For Django projects I like Model Mommy
https://github.com/vandersonmota/model_mommy

My main likes
- It can create instances, with and without touching the database
- It generates required data, that I don't care about for the current
  test.
- A clean API, and a willingess to clean up ugly bits:
https://github.com/vandersonmota/model_mommy/pull/124

I wish I had more time to work on that :)

The data generation feature has actually uncovered fallacies in my code.
IIRC somethin like a missing validator.



> Confidentiality Notice: This e-mail and any attachments may contain
[...]
> any reliance thereon) is STRICTLY PROHIBITED. If you have received
> this e-mail in error, please immediately notify the sender and delete
[...]
> this information from your computer and destroy any related paper
> copies. Unless otherwise expressly stated in the text of the e-mail,
[...]

These kind of notices always make me think of the first phrase that made
me notice self-reference: "Wie dit leest is gek."


-- 
Chris Wesseling
Centrum Wiskunde & Informatica (CWI)
https://www.cwi.nl/people/ccw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140703/a83a72d5/attachment.pgp>


More information about the testing-in-python mailing list