someone forgot tests.... grrrr!

This commit is contained in:
niphlod
2014-01-20 21:28:44 +01:00
parent 48870b1dd1
commit 0c6eaf536a
4 changed files with 153 additions and 153 deletions
+3 -3
View File
@@ -142,7 +142,7 @@ class TestWeb(LiveTest):
assert(s.headers['cache-control'].startswith('max-age'))
def testSoap(self):
# test soap server implementation
# test soap server implementation
from gluon.contrib.pysimplesoap.client import SoapClient, SoapFault
url = 'http://127.0.0.1:8000/examples/soap_examples/call/soap?WSDL'
client = SoapClient(wsdl=url)
@@ -155,7 +155,7 @@ class TestWeb(LiveTest):
ret = client.Division(a=3, b=0)
except SoapFault, sf:
# verify the exception value is ok
assert(sf.faultstring == "float division by zero")
# assert(sf.faultstring == "float division by zero") # true only in 2.7
assert(sf.faultcode == "Server.ZeroDivisionError")
# store sent and received xml for low level test
@@ -171,7 +171,7 @@ class TestWeb(LiveTest):
# check internal server error returned (issue 153)
assert(s.status == 500)
assert(s.text == xml_response)
if __name__ == '__main__':
unittest.main()