diff --git a/wsme/tests/test_api.py b/wsme/tests/test_api.py index 4157acf..a64cbff 100644 --- a/wsme/tests/test_api.py +++ b/wsme/tests/test_api.py @@ -191,10 +191,15 @@ class TestController(unittest.TestCase): return a * b mul_int = expose(int, int, int, wrap=True)(multiply) + mul_float = expose( float, float, float, wrap=True)(multiply) + mul_string = expose( + wsme.types.text, wsme.types.text, int, + wrap=True)(multiply) + r = MyRoot(['restjson']) app = webtest.TestApp(r.wsgiapp()) @@ -211,6 +216,12 @@ class TestController(unittest.TestCase): self.assertEquals(res.body, '8.8') + res = app.get('/mul_string?a=hello&b=2', headers={ + 'Accept': 'application/json' + }) + + self.assertEquals(res.body, '"hellohello"') + class TestFunctionDefinition(unittest.TestCase):