diff options
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_xmlrpc/xmlrpc_test.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ipatests/test_xmlrpc/xmlrpc_test.py b/ipatests/test_xmlrpc/xmlrpc_test.py index 21959fbb1..8f31a1ec0 100644 --- a/ipatests/test_xmlrpc/xmlrpc_test.py +++ b/ipatests/test_xmlrpc/xmlrpc_test.py @@ -278,11 +278,18 @@ class Declarative(XMLRPC_test): # Iterate through the tests: name = self.__class__.__name__ for (i, test) in enumerate(self.tests): - nice = '%s[%d]: %s: %s' % ( - name, i, test['command'][0], test.get('desc', '') - ) - func = lambda: self.check(nice, **test) - func.description = nice + if callable(test): + func = lambda: test(self) + nice = '%s[%d]: call %s: %s' % ( + name, i, test.__name__, test.__doc__ + ) + func.description = nice + else: + nice = '%s[%d]: %s: %s' % ( + name, i, test['command'][0], test.get('desc', '') + ) + func = lambda: self.check(nice, **test) + func.description = nice yield (func,) # Iterate through post-cleanup: |