@skipUnlessDBFeature('supports_transactions')
    def test_autocommit_context_manager(self):
        with self.assertRaises(Exception):
            with transaction.autocommit():
                self.create_reporter_and_fail()

        self.assertEqual(Reporter.objects.count(), 1)
The autocommit context manager works exactly the same as the default
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/transactions/tests.py/TransactionContextManagerTests.test_autocommit_context_manager