amends 1ea5bc68101a7f4075553df49fe58ba0b250316b

This commit is contained in:
Christophe de Vienne 2013-01-17 21:24:16 +01:00
parent d8355f1cdf
commit 16f75d19e4

View File

@ -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):