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')
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')
def setUp(self): try: pisock.dlp_DeleteDB(sd, 0, 'PythonTestSuite') except: pass
def setUp(self): try: pisock.dlp_DeleteDB(sd,0,'PythonTestSuite') except: pass