From 7bb637acb14c9300e1024ce358371b4905c2b9bf Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Wed, 19 Oct 2011 13:35:49 +0200 Subject: [PATCH] The function path now contains the function name --- wsme/controller.py | 2 +- wsme/tests/test_controller.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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):