This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test.testcases import TransactionTestCase | |
from rest_framework.test import APITransactionTestCase | |
class TransactionTestCaseWithoutFlush(TransactionTestCase): | |
def _fixture_teardown(self): | |
""" | |
Prevents TransactionTestCase from calling the flush command. 'flush' calls TRUNCATE on postgres and it's | |
awfully slow. Use at your own risk | |
:return: |