From 5ca0186863b4b7e7d471ec570d7f05b2068a02d7 Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Wed, 16 Jan 2013 21:40:45 +0100 Subject: [PATCH] Fix the tg 1.x tests --HG-- extra : rebase_source : 2a19a7022e1d99042de403a5c310dda994b5650a --- tests/test_tg1.py | 15 ++++++++++----- tests/test_tg15.py | 5 +++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/test_tg1.py b/tests/test_tg1.py index e8d4183..2e1fb4b 100644 --- a/tests/test_tg1.py +++ b/tests/test_tg1.py @@ -21,7 +21,8 @@ class Root(RootController): ws.addprotocol( 'soap', tns=test_soap.tns, - typenamespace=test_soap.typenamespace + typenamespace=test_soap.typenamespace, + baseURL='/ws/' ) ws = wsme.tg11.adapt(ws) @@ -89,14 +90,18 @@ class TestController(unittest.TestCase): assert response.body == "50" def test_soap_wsdl(self): - wsdl = self.app.get('/ws/api.wsdl').body - print wsdl - assert 'multiply' in wsdl + ts = test_soap.TestSOAP('test_wsdl') + ts.app = self.app + ts.ws_path = '/ws/' + ts.run() + #wsdl = self.app.get('/ws/api.wsdl').body + #print wsdl + #assert 'multiply' in wsdl def test_soap_call(self): ts = test_soap.TestSOAP('test_wsdl') ts.app = self.app - ts.ws_path = '/ws' + ts.ws_path = '/ws/' print ts.ws_path assert ts.call('multiply', a=5, b=10, _rt=int) == 50 diff --git a/tests/test_tg15.py b/tests/test_tg15.py index 3a1d093..ff40f8c 100644 --- a/tests/test_tg15.py +++ b/tests/test_tg15.py @@ -12,7 +12,8 @@ class Root(RootController): ws = WSRoot(webpath='/ws') ws.addprotocol('soap', tns=test_soap.tns, - typenamespace=test_soap.typenamespace + typenamespace=test_soap.typenamespace, + baseURL='/ws/' ) ws = wsme.tg15.adapt(ws) @@ -85,7 +86,7 @@ class TestController(testutil.TGTest): def test_soap_call(self): ts = test_soap.TestSOAP('test_wsdl') ts.app = self.app - ts.ws_path = '/ws' + ts.ws_path = '/ws/' print ts.ws_path assert ts.call('multiply', a=5, b=10, _rt=int) == 50