Blog

The Digital Agency for International Development

Django Dynamic Fixtures with unusual primary keys

By Chris Wilson on 08 January 2013

Django Dynamic Fixtures is a very nice way to make tests more readable, semantic, and maintainable, reduce action at a distance, and increase performance, by eschewing static test fixtures.

While using them on the iSchool Learning Environment project, I found that they might not work properly if you have a model whose primary key is not called id. Forked it on github, fixed the bug and submitted a pull request. The author Paulo Cheque merged it same day. +1 for responsive Open Source authors.

Now if only he'd release version 1.6.4 soon, so that we could have the fix for the naive datetime objects bug, that would be awesome.