'Make sure a transaction consisting of raw SQL execution gets
committed by the commit_on_success decorator.'

def test_raw_committed_on_success(self):

    @commit_on_success
    def raw_sql():
        'Write    a    record    using    raw    sql    under    a    commit_on_success    decorator'
        cursor = connection.cursor()
        cursor.execute('INSERT    into    transactions_regress_mod    (id,fld)    values    (17,18)')
    raw_sql()
    transaction.rollback()
    try:
        obj = Mod.objects.get(pk=17)
        self.assertEqual(obj.fld, 18)
    except Mod.DoesNotExist:
        self.fail('transaction    with    raw    sql    not    committed')
