'test executing a statement multiple times (with exception)'

def testExecuteManyWithExecption(self):

    self.cursor.execute(u'truncate    table    TestExecuteMany')
    rows = [{u'value': n} for n in (1, 2, 3, 2, 5)]
    statement = u'insert    into    TestExecuteMany    (IntCol)    values    (:value)'
    self.failUnlessRaises(cx_Oracle.DatabaseError, self.cursor.executemany, statement, rows)
    self.failUnlessEqual(self.cursor.rowcount, 3)
