Пример #1
0
 def _readCallSetTable(self, cursor):
     cursor.row_factory = sqlite3.Row
     cursor.execute("SELECT * FROM CallSet;")
     for row in cursor:
         variantSet = self.getVariantSet(row[b'variantSetId'])
         callSet = variants.CallSet(variantSet, row[b'name'])
         callSet.populateFromRow(row)
         assert callSet.getId() == row[b'id']
         # Insert the callSet into the memory-based object model.
         variantSet.addCallSet(callSet)
Пример #2
0
 def testGetCallSet(self):
     path = "/callsets"
     for dataset in self.backend.getDatasets():
         for variantSet in dataset.getVariantSets():
             for callSet in variantSet.getCallSets():
                 responseObject = self.sendGetObject(
                     path, callSet.getId(), protocol.CallSet)
                 self.verifyCallSetsEqual(responseObject, callSet)
             for badId in self.getBadIds():
                 callSet = variants.CallSet(variantSet, badId)
                 self.verifyGetMethodFails(path, callSet.getId())
     for badId in self.getBadIds():
         self.verifyGetMethodFails(path, badId)