On Wed, 2017-02-22 at 15:06 +0000, 'Tom Evans' via Django users wrote:
> On Wed, Feb 22, 2017 at 2:41 PM, Adam Stein <a...@csh.rit.edu> wrote:
> > 
> > On Wed, 2017-02-22 at 14:22 +0000, 'Tom Evans' via Django users
> > wrote:
> > 
> > The URL you refer to mentions about loading data for apps. Doesn't
> > mention
> > anything in regards to tests. Why are fixtures bad for tests? In
> > fact, right
> > above the "Providing initial data with migrations" section is a
> > "See also"
> > box that says "Fixtures are also used by the testing framework to
> > help set
> > up a consistent test environment". It would seem to me that the
> > docs are
> > telling you to use fixtures for tests and use migrations for real
> > data.
> OK. How do I load that data from a fixture in a TestCase I cannot
> modify?
Unfortunately, nothing easy comes to mind. My only thought was the
possibility of putting your own wrapper around their tests. The idea
being is that you call your wrapper which in turns loads the fixtures
and calls their tests rather than having Django call their tests
directly. This wrapper could be a unit test or be a derivative of the
Django test runner. Don't know how feasible either is but I'm guessing
neither would be trivial. Maybe I'm wrong, I didn't pursue the thought
any more than having a wrapper of some kind.
I was originally just going on your statements that fixtures weren't
used in the tests because they weren't recommended (which is not really
the case). Hope you figure something out.
> Cheers
> 
> Tom
> 
> 

-- 
Adam (a...@csh.rit.edu)


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1487776952.29637.10.camel%40csh.rit.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to