def METHOD_NAME(self):
    con = self.connect()
    try:
        xid = self.make_xid(con)
        cursor = con.cursor()
        cursor.execute("SELECT 1")
        self.assertRaises(self.driver.ProgrammingError,
                          con.tpc_begin, xid)
    finally:
        con.close()