When using test fixtures in Django is the convention to include the foreign models inside of the test fixture i.e.
class NewsletterTest(TestCase):
fixtures = ('newsletters.json')
# Test stuff
Vs. loading associated models in order:
class NewsletterTest(TestCase):
fixtures = ('events.json','newsletters.json')
# Test stuff
It seems like the pros of including it in the same testfixture file is that if I need to change my fixture data for a test in another spot, I might break a test somewhere else relying on that data. On the other hand if I update my model, I may need to update my test fixture, which would mean updating it in every location it’s used. How is this usually handled?
I ended up including everything. The testfixture should have everything it needs to load properly, who wants to manage multiple levels of testfixture dependencies, down there lies madness!