Re: Doctests and fixtures

2007-08-14 Thread eXt
Thanks! On 14 Sie, 12:52, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 8/14/07, eXt <[EMAIL PROTECTED]> wrote: > > > > > But how to load fixture for doctest? Do I have to load it from > > doctest's code? There is also initial_data fixture but I don't want to > > use it for this purpose.

Re: Doctests and fixtures

2007-08-14 Thread Russell Keith-Magee
On 8/14/07, eXt <[EMAIL PROTECTED]> wrote: > > But how to load fixture for doctest? Do I have to load it from > doctest's code? There is also initial_data fixture but I don't want to > use it for this purpose. Yes, you need to call management.load_data manually. The code looks something like: fr

Doctests and fixtures

2007-08-14 Thread eXt
Hi! What is the proper way to use fixtures with doctests? For unittest we have something like: from django.test import TestCase from myapp.models import Animal class AnimalTestCase(TestCase): fixtures = ['mammals.json', 'birds'] def setUp(self): # test definitions as before