I am getting TransactionManagementError when trying to save a Django User model instance and in its post_save signal, I\'m saving some models that have the user as the forei
I have the same issue, but with transaction.atomic() and TransactionTestCase didn't work for me.
python manage.py test -r instead of python manage.py test is ok for me, maybe the order of execution is crucial
then i find a doc about Order in which tests are executed, It mentions which test will run first.
So, i use TestCase for database interaction, unittest.TestCase for other simple test, it works now!