Jelajahi Sumber

[add] testGetConfig.py

jinghao_wb 9 tahun lalu
induk
melakukan
3ed97d84d5
1 mengubah file dengan 33 tambahan dan 0 penghapusan
  1. 33 0
      Test/testGetConfig.py

+ 33 - 0
Test/testGetConfig.py

@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+"""
+-------------------------------------------------
+   File Name:     testGetConfig
+   Description :   test all function in GetConfig.py
+   Author :        J_hao
+   date:          2017/7/31
+-------------------------------------------------
+   Change Activity:
+                   2017/7/31:
+-------------------------------------------------
+"""
+__author__ = 'J_hao'
+
+from Util.GetConfig import GetConfig
+
+
+# noinspection PyPep8Naming
+def testGetConfig():
+    """
+    test class GetConfig in Util/GetConfig
+    :return:
+    """
+    gg = GetConfig()
+    print(gg.db_type)
+    print(gg.db_name)
+    print(gg.db_host)
+    print(gg.db_port)
+    assert isinstance(gg.proxy_getter_functions, list)
+    print(gg.proxy_getter_functions)
+
+if __name__ == '__main__':
+    testGetConfig()