Пример #1
0
 def test_issue_142(self):
     conn = DB(testconfig.dsn, tilevel=2, typecasts={})
     conn.open()
     try:
         cur1 = conn.getcursor()
         cur1.execute("create table test142(id integer)")
         cur1.close()
         cur2 = conn.getcursor()
         cur2.execute("insert into test142 values (1)")
         cur2.close()
         cur3 = conn.getcursor()
         cur3.execute("select * from test142")
         self.assertEquals(cur3.fetchone(), (1, ))
         cur3.close()
     finally:
         conn.close()
Пример #2
0
 def test_issue_142(self):
     conn = DB(testconfig.dsn, tilevel=2, typecasts={})
     conn.open()
     try:
         cur1 = conn.getcursor()
         cur1.execute("create table test142(id integer)")
         cur1.close()
         cur2 = conn.getcursor()
         cur2.execute("insert into test142 values (1)")
         cur2.close()
         cur3 = conn.getcursor()
         cur3.execute("select * from test142")
         self.assertEquals(cur3.fetchone(), (1,))
         cur3.close()
     finally:
         conn.close()
Пример #3
0
 def DA_connect():
     db = DB(testconfig.dsn, tilevel=2, typecasts=typecasts)
     db.open()
     return db
Пример #4
0
 def DA_connect():
     db = DB(testconfig.dsn, tilevel=2, typecasts=typecasts)
     db.open()
     return db