You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
1.2 KiB

  1. #!/usr/bin/env python
  2. import unittest, sys
  3. from ConfigParser import ConfigParser
  4. from ZSI.wstools.WSDLTools import WSDLReader
  5. from test_wsdl import WSDLToolsTestCase, NETWORK, STANDALONE
  6. CONFIG = None
  7. class AmazonTestCase(WSDLToolsTestCase):
  8. def test(self):
  9. self.option = 'amazon'
  10. self.loadFromConfig(CONFIG)
  11. class AirportTestCase(WSDLToolsTestCase):
  12. def test(self):
  13. self.option = 'airport'
  14. self.loadFromConfig(CONFIG)
  15. class OGSITestCase(WSDLToolsTestCase):
  16. def test(self):
  17. self.option = 'ogsi'
  18. self.loadFromConfig(CONFIG)
  19. CASES = [AmazonTestCase, AirportTestCase, OGSITestCase]
  20. def makeNetworkSuite():
  21. return getSuite(NETWORK)
  22. def makeStandAloneSuite():
  23. return getSuite(STANDALONE)
  24. def getSuite(section):
  25. tests = []
  26. suite = unittest.TestSuite()
  27. loader = unittest.TestLoader()
  28. for case in CASES:
  29. case.section = section
  30. test = loader.loadTestsFromTestCase(case)
  31. tests.append(test)
  32. suite.addTests(tests)
  33. return suite
  34. def main():
  35. global CONFIG
  36. from test_wstools import CONFIG_FILE
  37. CONFIG = ConfigParser()
  38. CONFIG.read(CONFIG_FILE)
  39. unittest.TestProgram(defaultTest='makeStandAloneSuite')
  40. if __name__ == "__main__" : main()