diff --git a/wsme/controller.py b/wsme/controller.py index bdf1488..33f28ea 100644 --- a/wsme/controller.py +++ b/wsme/controller.py @@ -44,7 +44,7 @@ def scan_api(controller, path=[]): a = getattr(controller, name) if inspect.ismethod(a): if hasattr(a, '_wsme_definition'): - yield path, a._wsme_definition + yield path + [name], a._wsme_definition elif inspect.isclass(a): continue else: diff --git a/wsme/tests/test_controller.py b/wsme/tests/test_controller.py index 58ac906..39e50f1 100644 --- a/wsme/tests/test_controller.py +++ b/wsme/tests/test_controller.py @@ -143,7 +143,7 @@ class TestController(unittest.TestCase): api = list(scan_api(r)) assert len(api) == 1 path, fd = api[0] - assert path == ['ns'] + assert path == ['ns', 'multiply'] assert fd.name == 'multiply' def test_scan_subclass(self):