testConfigHandler.py 836 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- coding: utf-8 -*-
  2. """
  3. -------------------------------------------------
  4. File Name: testGetConfig
  5. Description : testGetConfig
  6. Author : J_hao
  7. date: 2017/7/31
  8. -------------------------------------------------
  9. Change Activity:
  10. 2017/7/31:
  11. -------------------------------------------------
  12. """
  13. __author__ = 'J_hao'
  14. from handler.configHandler import ConfigHandler
  15. from time import sleep
  16. def testConfig():
  17. """
  18. :return:
  19. """
  20. conf = ConfigHandler()
  21. print(conf.dbConn)
  22. print(conf.serverPort)
  23. print(conf.serverHost)
  24. print(conf.useProxy)
  25. print(conf.rawProxy)
  26. assert isinstance(conf.fetchers, list)
  27. print(conf.fetchers)
  28. for _ in range(10):
  29. print(conf.fetchers)
  30. sleep(5)
  31. if __name__ == '__main__':
  32. testConfig()