5👍
✅
If you’re using migrations, your initial_data.json is loaded after every migration. If you want to load a fixture in your tests, do this:
class ResumeTest(TestCase):
fixtures = ['my_data']
...
See Official django documentation.
Additionally, rename your ‘initial_data.json’ to ‘my_data.json’ to avoid it being loaded after every migration, which is what is probably causing your tests to fail.
Source:stackexchange.com