Example #1
0
 def test_documentation(self):
     """  Assert that documentation can be retrieved for each imported module """
     mods = oxide.modules_list()
     for mod in mods:
         fail_msg = "Not able to retrieve documentation for " + mod 
         doc = oxide.documentation(mod)
         self.assertNotEqual(doc, None, fail_msg)
Example #2
0
 def test_opts_doc(self):
     """ Assert that each module that has an opts_doc also has the required fields """
     mods = oxide.modules_list()
     for mod in mods:
         opts_doc = doc = oxide.documentation(mod)["opts_doc"]
         for opt in opts_doc:
             opts_keys = ["type", "mangle", "default"]
             for opts_key in opts_keys:
                 fail_msg = "opts_doc for module %s missing key %s." % (mod, opts_key)
                 self.assertTrue(opts_doc[opt].has_key(opts_key), fail_msg)