def testListReferenceBases(self):
        for referenceSet in self.dataRepo.getReferenceSets():
            for reference in referenceSet.getReferences():
                id_ = reference.getId()
                length = reference.getLength()
                sequence = reference.getBases(0, length)
                # fetch the bases
                args = protocol.ListReferenceBasesRequest()
                response = self.sendListReferenceBasesRequest(id_, args)
                self.assertEqual(response.sequence, sequence)
                # Try some simple slices.
                ranges = [(0, length), (0, 1), (length - 1, length), (0, 0)]
                for start, end in ranges:
                    args = protocol.ListReferenceBasesRequest()
                    args.start, args.end = start, end
                    response = self.sendListReferenceBasesRequest(id_, args)
                    self.assertEqual(response.sequence, sequence[start:end])
                    self.assertIsNone(response.nextPageToken)
                    self.assertEqual(response.offset, start)
dataset/ETHPy150Open ga4gh/server/tests/unit/test_simulated_stack.py/TestSimulatedStack.testListReferenceBases/original