system.listMethods() => ['add', 'subtract', 'multiple'] Returns a list of the methods supported by the server.
(self)
| 277 | return response.encode(self.encoding, 'xmlcharrefreplace') |
| 278 | |
| 279 | def system_listMethods(self): |
| 280 | """system.listMethods() => ['add', 'subtract', 'multiple'] |
| 281 | |
| 282 | Returns a list of the methods supported by the server.""" |
| 283 | |
| 284 | methods = set(self.funcs.keys()) |
| 285 | if self.instance is not None: |
| 286 | # Instance can implement _listMethod to return a list of |
| 287 | # methods |
| 288 | if hasattr(self.instance, '_listMethods'): |
| 289 | methods |= set(self.instance._listMethods()) |
| 290 | # if the instance has a _dispatch method then we |
| 291 | # don't have enough information to provide a list |
| 292 | # of methods |
| 293 | elif not hasattr(self.instance, '_dispatch'): |
| 294 | methods |= set(list_public_methods(self.instance)) |
| 295 | return sorted(methods) |
| 296 | |
| 297 | def system_methodSignature(self, method_name): |
| 298 | """system.methodSignature('add') => [double, int, int] |
no test coverage detected