mercredi 29 juillet 2015

How do I load fixtures from third-party app for django in tests?

I know fixtures can be loaded in the tests.py like this:

fixtures = ['example.json']

Django automatically search all the apps' fixture directory and load the fixtures.

However, I create a reusable app named 'accounts' and in accounts I also have the fixtures/example.json file. But when I installed the 'accounts' app and write it into the INSTALLED_APP settings, the fixture cannot be loaded. I am curious why it happens.

Django == 1.8.2

Aucun commentaire:

Enregistrer un commentaire