Fix the tg 1.x tests

--HG--
extra : rebase_source : 2a19a7022e1d99042de403a5c310dda994b5650a
This commit is contained in:
Christophe de Vienne 2013-01-16 21:40:45 +01:00
parent 825686b1e6
commit 5ca0186863
2 changed files with 13 additions and 7 deletions

View File

@ -21,7 +21,8 @@ class Root(RootController):
ws.addprotocol( ws.addprotocol(
'soap', 'soap',
tns=test_soap.tns, tns=test_soap.tns,
typenamespace=test_soap.typenamespace typenamespace=test_soap.typenamespace,
baseURL='/ws/'
) )
ws = wsme.tg11.adapt(ws) ws = wsme.tg11.adapt(ws)
@ -89,14 +90,18 @@ class TestController(unittest.TestCase):
assert response.body == "<result>50</result>" assert response.body == "<result>50</result>"
def test_soap_wsdl(self): def test_soap_wsdl(self):
wsdl = self.app.get('/ws/api.wsdl').body ts = test_soap.TestSOAP('test_wsdl')
print wsdl ts.app = self.app
assert 'multiply' in wsdl 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): def test_soap_call(self):
ts = test_soap.TestSOAP('test_wsdl') ts = test_soap.TestSOAP('test_wsdl')
ts.app = self.app ts.app = self.app
ts.ws_path = '/ws' ts.ws_path = '/ws/'
print ts.ws_path print ts.ws_path
assert ts.call('multiply', a=5, b=10, _rt=int) == 50 assert ts.call('multiply', a=5, b=10, _rt=int) == 50

View File

@ -12,7 +12,8 @@ class Root(RootController):
ws = WSRoot(webpath='/ws') ws = WSRoot(webpath='/ws')
ws.addprotocol('soap', ws.addprotocol('soap',
tns=test_soap.tns, tns=test_soap.tns,
typenamespace=test_soap.typenamespace typenamespace=test_soap.typenamespace,
baseURL='/ws/'
) )
ws = wsme.tg15.adapt(ws) ws = wsme.tg15.adapt(ws)
@ -85,7 +86,7 @@ class TestController(testutil.TGTest):
def test_soap_call(self): def test_soap_call(self):
ts = test_soap.TestSOAP('test_wsdl') ts = test_soap.TestSOAP('test_wsdl')
ts.app = self.app ts.app = self.app
ts.ws_path = '/ws' ts.ws_path = '/ws/'
print ts.ws_path print ts.ws_path
assert ts.call('multiply', a=5, b=10, _rt=int) == 50 assert ts.call('multiply', a=5, b=10, _rt=int) == 50