Error on testcase after update from django 2 to 4

58 Views Asked by At

I'm updating my entire project from Django 2.2 to Django 4.2.3. I have already read the entire deprecation timeline and done regression tests, and everything is working. But, using the TestCase, I found a difference: tear_down isn't flushing the database after each test, and when it runs, models that are created in migrations are removed as well. Does anyone know what has changed between those versions that can affect tests, teardown, and flush?

I tried debbug testcase source code while running my tests, and read changelogs and deprecation list from django docs but without any tip.

0

There are 0 best solutions below