'With the commit_on_success context manager, the transaction is only
committed if the block doesn\'t throw an exception.'

@skipUnlessDBFeature('supports_transactions')
def test_commit_on_success(self):

    with self.assertRaises(Exception):
        with transaction.commit_on_success():
            self.create_reporter_and_fail()
    self.assertEqual(Reporter.objects.count(), 0)
