1

I have a Django project with production fixtures and testing fixtures. How to make testing fixtures loaded only while running tests?

Sashko Lykhenko
  • 1,554
  • 4
  • 20
  • 36

1 Answers1

1

You just need to put it into fixtures property of your testcase class. Like this:

  class AnimalTestCase(TestCase):
      fixtures = ['mammals.json', 'birds']

Docs can be found here

Aldarund
  • 17,312
  • 5
  • 73
  • 104