tests/utils.py
def run_commit_hooks(self):
        """
        Fake transaction commit to run delayed on_commit functions
        """
        atomic_module = 'django.db.backends.base.base.BaseDatabaseWrapper' \
                        '.validate_no_atomic_block'
        for db_name in reversed(self._databases_names()):
            with mock.patch(atomic_module, lambda a: False):
                transaction.get_connection(
                    using=db_name
                ).run_and_clear_commit_hooks()

        Fake transaction commit to run delayed on_commit functions
        
Fake transaction commit to run delayed on_commit functions
Fake transaction commit to run delayed on_commit functions
def run_commit_hooks(self):
        atomic_module = 'django.db.backends.base.base.BaseDatabaseWrapper' \
                        '.validate_no_atomic_block'
        for db_name in reversed(self._databases_names()):
            with mock.patch(atomic_module, lambda a: False):
                transaction.get_connection(
                    using=db_name
                ).run_and_clear_commit_hooks()
def run_commit_hooks ( self ) : atomic_module = 'django.db.backends.base.base.BaseDatabaseWrapper' '.validate_no_atomic_block' for db_name in reversed ( self . _databases_names ( ) ) : with mock . patch ( atomic_module , lambda a : False ) : transaction . get_connection ( using = db_name ) . run_and_clear_commit_hooks ( )
Fake transaction commit to run delayed on_commit functions
Fake transaction commit to run delayed on_commit functions
"""
        Fake transaction commit to run delayed on_commit functions
        """
self