I have a number of tests that all pass if I just run the file individually in Pycharm. But if run them as using the DiscoverRunner some of them fail.
I know it must have something to do with the tests setup, so I am looking for input on how to debug this.
Things I already tried based on other stackoverflow answers:
- Make sure all the testscases are django.test.TestCase. Most test load data from fixtures in the class definition.
- Make sure to call the super method where I define the tearDown method.
I had two tests files that used mail.outbox when run together. But if I put them together in a package inside the test folder they suddenly passed.
Any idea what could be causing this? Any tips on how to debug this?