Returns a list of all tests in this OvalDocument where each list item is of type OvalTest Returns None if no tests could be found @rtype: List @return: All tests in the OVAL document or None if none were found
(self)
| 332 | return [OvalDefinition(element) for element in element_list] |
| 333 | |
| 334 | def getTests(self): |
| 335 | """ |
| 336 | Returns a list of all tests in this OvalDocument where each list item is of type OvalTest |
| 337 | Returns None if no tests could be found |
| 338 | |
| 339 | @rtype: List |
| 340 | @return: All tests in the OVAL document or None if none were found |
| 341 | """ |
| 342 | root = self.getDocumentRoot() |
| 343 | if not root: |
| 344 | return None |
| 345 | |
| 346 | testroot = root.find("def:tests", OvalDocument.NS_DEFAULT) |
| 347 | |
| 348 | if testroot is None: |
| 349 | return None |
| 350 | |
| 351 | element_list = list(testroot) |
| 352 | if not element_list: |
| 353 | return None |
| 354 | |
| 355 | return [OvalTest(element) for element in element_list] |
| 356 | |
| 357 | def getObjects(self): |
| 358 | """ |