Django - Testing with parts of original database
My database has two types of entries: The ver开发者_JS百科y dynamic (users, comments, etc) and the more static (email templates, flat-pages).
During testing I want a clean DB but with the real 'semi-static' data.
Is there a way to make Django's testing system to load parts of the original DB ?
Thanks
Use fixtures. See the documentation or the (wiki page](https://code.djangoproject.com/wiki/Fixtures)
Put data you need into fixtures and they will be loaded every time test database is built.
精彩评论