summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2008-02-04 18:05:18 -0500
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2008-02-04 18:05:18 -0500
commit7b381bcde1ed1c81e9be5bccc523faac85f68c69 (patch)
tree5ed7f29081f89f0777cf38ad13333e6884280eb0 /test
parentc62d571b7ceb5b84e4cf33a13fe07f31984b4514 (diff)
downloadthird_party-func-7b381bcde1ed1c81e9be5bccc523faac85f68c69.tar.gz
third_party-func-7b381bcde1ed1c81e9be5bccc523faac85f68c69.tar.xz
third_party-func-7b381bcde1ed1c81e9be5bccc523faac85f68c69.zip
add two new methods to poke at everymodule
call "list_methods" also, call "inventory" if it exists
Diffstat (limited to 'test')
-rw-r--r--test/unittest/test_client.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/unittest/test_client.py b/test/unittest/test_client.py
index 6b386b5..c2154ea 100644
--- a/test/unittest/test_client.py
+++ b/test/unittest/test_client.py
@@ -40,15 +40,35 @@ class BaseTest:
result = mod.module_description()
self.assert_on_fault(result)
+ def test_module_list_methods(self):
+ mod = getattr(self.client, self.module)
+ result = mod.list_methods()
+ self.assert_on_fault(result)
+
+ def test_module_inventory(self):
+ mod = getattr(self.client, self.module)
+ result = mod.list_methods()
+ res = result[self.th]
+
+ # not all modules have an inventory, so check for it
+ # FIXME: not real happy about having to call list method for
+ # every module, but it works for now -akl
+ if "inventory" in res:
+ result = mod.inventory()
+ self.assert_on_fault(result)
+
+
# we do this all over the place...
def assert_on_fault(self, result):
assert func.utils.is_error(result[self.th]) == False
# assert type(result[self.th]) != xmlrpclib.Fault
+ # attrs set so we can skip these via nosetest
test_module_version.intro = True
test_module_api_version.intro = True
test_module_description.intro = True
-
+ test_module_list_methods.into = True
+ test_module_module_intentory = True
class TestTest(BaseTest):
module = "test"