Browse Source

High level client code generator tests moved elsewhere.

main
David Robertson 21 years ago
parent
commit
d8bd928ef8
1 changed files with 20 additions and 13 deletions
  1. +20
    -13
      test/test_wsdl2python.py

+ 20
- 13
test/test_wsdl2python.py View File

@@ -49,27 +49,34 @@ class Wsdl2pythonTest(unittest.TestCase):
raise
codegen = wsdl2python.WriteServiceModule(wsdl)
f_types, f_services = codegen.get_module_names()

strFile = StringIO.StringIO()
self.testdiff.setDiffFile(f_types + ".py")
try:
codegen.write_service_types(f_types, strFile)
except:
self.path = self.path + ": write_service_types"
raise
self.testdiff.failUnlessEqual(strFile)
strFile.close()
hasSchema = len(codegen._wa.getSchemaDict())

if hasSchema:
strFile = StringIO.StringIO()
self.testdiff.setDiffFile(f_types + ".py")
try:
codegen.write_service_types(f_types, strFile)
except:
self.path = self.path + ": write_service_types"
raise
if strFile.closed:
print "trouble"
self.testdiff.failUnlessEqual(strFile)
strFile.close()

strFile = StringIO.StringIO()
self.testdiff.setDiffFile(f_services + ".py")
try:
codegen.write_services(f_types, f_services, strFile)
signatures = codegen.write_services(f_types,
f_services, strFile, hasSchema)
except:
self.path = self.path + ": write_services"
raise
self.testdiff.failUnlessEqual(strFile)
strFile.close()



def makeTestSuite(section=None):
global configLoader

@@ -85,9 +92,9 @@ def makeTestSuite(section=None):
return suite


def main():
def foo():
loader = utils.MatchTestLoader(False, "config.py", "makeTestSuite")
unittest.main(defaultTest="makeTestSuite", testLoader=loader)

if __name__ == "__main__" : main()
if __name__ == "__main__" : foo()

Loading…
Cancel
Save