示例#1
0
 def testDatabaseCreationAndSearch(self):
     db = pisock.dlp_CreateDB(sd,'test','DATA',0,0,1,'PythonTestSuite')
     assert db != None
     pisock.dlp_SetDBInfo(sd, db, pisock.dlpDBFlagBackup, pisock.dlpDBFlagCopyPrevention, 0, 0, 0, 0, 'data', 0)
     pisock.dlp_CloseDB(sd,db)
     db = pisock.dlp_OpenDB(sd, 0, pisock.dlpOpenReadWrite, 'PythonTestSuite')
     assert db != None
     info = pisock.dlp_FindDBByOpenHandle(sd, db)
     if VERBOSE:
         print 'FindDBByOpenHandle:'
         print '\tcardNo',info[0]
         print '\tlocalID',info[1]
         dumpDBInfo(info[2])
         dumpDBSizeInfo(info[3])
     pisock.dlp_CloseDB(sd,db)
     pisock.dlp_DeleteDB(sd,0,'PythonTestSuite')
示例#2
0
 def testDatabaseCreationAndSearch(self):
     db = pisock.dlp_CreateDB(sd, 'test', 'DATA', 0, 0, 1,
                              'PythonTestSuite')
     assert db != None
     pisock.dlp_SetDBInfo(sd, db, pisock.dlpDBFlagBackup,
                          pisock.dlpDBFlagCopyPrevention, 0, 0, 0, 0,
                          'data', 0)
     pisock.dlp_CloseDB(sd, db)
     db = pisock.dlp_OpenDB(sd, 0, pisock.dlpOpenReadWrite,
                            'PythonTestSuite')
     assert db != None
     info = pisock.dlp_FindDBByOpenHandle(sd, db)
     if VERBOSE:
         print 'FindDBByOpenHandle:'
         print '\tcardNo', info[0]
         print '\tlocalID', info[1]
         dumpDBInfo(info[2])
         dumpDBSizeInfo(info[3])
     pisock.dlp_CloseDB(sd, db)
     pisock.dlp_DeleteDB(sd, 0, 'PythonTestSuite')
示例#3
0
 def setUp(self):
     try:
         pisock.dlp_DeleteDB(sd, 0, 'PythonTestSuite')
     except:
         pass
示例#4
0
 def setUp(self):
     try:
         pisock.dlp_DeleteDB(sd,0,'PythonTestSuite')
     except:
         pass