Commit 190d18d238e54f3cb99f2a5c7b9dd62852adbf5a

Authored by liujiqiang
1 parent 9383e4dc

更新

commons/api/cardLostAndUnLost.py
... ... @@ -12,7 +12,6 @@
12 12  
13 13 import requests
14 14 import json
15   -from commons.readConf import readConfig
16 15 from commons.scripts import dealContentType as dCT
17 16  
18 17 def getAccountInfo(gatewayHost=None,clientHeaders=None,cardNo=None):
... ...
commons/api/cardStock.py
... ... @@ -11,8 +11,6 @@
11 11 """
12 12  
13 13 import requests
14   -import json
15   -from commons.readConf import readConfig
16 14  
17 15 print("cS")
18 16  
... ...
commons/api/cardStorageIn.py
... ... @@ -12,7 +12,6 @@
12 12  
13 13 import requests
14 14 import json
15   -from commons.readConf import readConfig
16 15  
17 16 print("cSI")
18 17  
... ...
commons/api/doLogin.py
... ... @@ -11,7 +11,7 @@
11 11  
12 12 import requests
13 13 import json
14   -from commons.readConf import readConfig
  14 +from commons.scripts.readConf import readConfig
15 15  
16 16 class doLogin():
17 17 def __init__(self):
... ...
commons/clientSession.py
... ... @@ -11,7 +11,7 @@
11 11  
12 12 import requests
13 13 import json
14   -from commons.readConf import readConfig
  14 +from commons.scripts.readConf import readConfig
15 15  
16 16 class cliSession(object):
17 17 def __init__(self):
... ...
commons/readConf.py renamed to commons/scripts/readConf.py
... ... @@ -22,7 +22,7 @@ class readConfig(object):
22 22 self.file_name = r'test_config_hg'
23 23 self.relative_path = r'/config/marketConfig/'
24 24 self.file_path = os.path.abspath(
25   - os.path.join(os.path.dirname(__file__), "../")) + self.relative_path + self.file_name
  25 + os.path.join(os.path.dirname(__file__), "../../")) + self.relative_path + self.file_name
26 26 print(self.file_path)
27 27 self.conf.read(self.file_path,encoding="utf-8")
28 28  
... ...
report/test.log
  1 +[2021-07-20 12:54:20] [INFO] : 发送邮件
  2 +[2021-07-20 12:54:22] [INFO] : 邮件发送完毕
... ...
testCase/cardSystem/test_addCard.py
... ... @@ -10,16 +10,14 @@
10 10 """
11 11  
12 12 import unittest
13   -import requests
14 13 import time
15   -import json
16 14 import math
17 15 import commons.api.cardStorageIn as cSI
18 16 import commons.api.cardStock as cS
19 17 import commons.api.cardStorageOut as cSO
20   -from commons.readConf import readConfig
  18 +from commons.scripts.readConf import readConfig
21 19 from commons.api.doLogin import doLogin
22   -from commons.MySession import mysession
  20 +
23 21  
24 22 class test_addCard(unittest.TestCase):
25 23 @classmethod
... ...
testCase/cardSystem/test_cardStorage.py
... ... @@ -11,14 +11,12 @@
11 11 """
12 12  
13 13 import unittest
14   -import requests
15 14 import time
16   -import json
17 15 import math
18 16 import commons.api.cardStorageIn as cSI
19 17 import commons.api.cardStock as cS
20 18 import commons.api.cardStorageOut as cSO
21   -from commons.readConf import readConfig
  19 +from commons.scripts.readConf import readConfig
22 20 from commons.api.doLogin import doLogin
23 21  
24 22 class test_cardStorage(unittest.TestCase):
... ...
testCase/cardSystem/test_changeCard.py
... ... @@ -11,17 +11,14 @@
11 11 """
12 12  
13 13 import unittest
14   -import requests
15 14 import time
16   -import json
17   -import math
18 15 import commons.api.cardStorageIn as cSI
19 16 import commons.api.returnCard as reC
20 17 import commons.api.cardStorageOut as cSO
21 18 import commons.api.openCard as oMC
22 19 import commons.api.cardStock as cS
23 20 import commons.api.changeCard as cC
24   -from commons.readConf import readConfig
  21 +from commons.scripts.readConf import readConfig
25 22 from commons.api.doLogin import doLogin
26 23  
27 24 class tset_changeCard(unittest.TestCase):
... ...
testCase/cardSystem/test_lossCard.py
... ... @@ -11,16 +11,13 @@
11 11 """
12 12  
13 13 import unittest
14   -import requests
15 14 import time
16   -import json
17   -import math
18 15 import commons.api.cardStorageIn as cardStorageIn
19 16 import commons.api.returnCard as returnCard
20 17 import commons.api.cardStorageOut as cardStorageOut
21 18 import commons.api.openCard as openCard
22 19 import commons.api.cardLostAndUnLost as cardLostAndUnLost
23   -from commons.readConf import readConfig
  20 +from commons.scripts.readConf import readConfig
24 21 from commons.api.doLogin import doLogin
25 22  
26 23 class test_lossCardAndUn(unittest.TestCase):
... ...
testCase/cardSystem/test_openMasterCard.py
... ... @@ -11,10 +11,7 @@
11 11 """
12 12  
13 13 import unittest
14   -import requests
15 14 import time
16   -import json
17   -import math
18 15 import commons.api.cardStorageIn as cSI
19 16 import commons.api.returnCard as reC
20 17 import commons.api.cardStorageOut as cSO
... ... @@ -22,7 +19,7 @@ import commons.api.openCard as oMC
22 19 import commons.api.cardStock as cS
23 20 from commons.scripts.createIdNum import cIN
24 21 from commons.api.doLogin import doLogin
25   -from commons.readConf import readConfig
  22 +from commons.scripts.readConf import readConfig
26 23  
27 24 class tset_openMasterCard(unittest.TestCase):
28 25 def setUp(self) -> None:
... ...
testCase/cardSystem/test_openSlaveCard.py
... ... @@ -11,17 +11,14 @@
11 11 """
12 12  
13 13 import unittest
14   -import requests
15 14 import time
16   -import json
17   -import math
18 15 import commons.api.cardStorageIn as cSI
19 16 import commons.api.returnCard as reC
20 17 import commons.api.cardStorageOut as cSO
21 18 import commons.api.openCard as oMC
22 19 import commons.api.cardLostAndUnLost as cLAUL
23 20 import commons.api.cardStock as cS
24   -from commons.readConf import readConfig
  21 +from commons.scripts.readConf import readConfig
25 22 from commons.api.doLogin import doLogin
26 23  
27 24 class tset_openMasterCard(unittest.TestCase):
... ...
testCase/cardSystem/test_outCard.py
... ... @@ -13,11 +13,10 @@
13 13 import unittest
14 14 import re
15 15 import time
16   -import json
17 16 import math
18 17 import commons.api.cardStorageIn as cSI
19 18 import commons.api.cardStorageOut as cSO
20   -from commons.readConf import readConfig
  19 +from commons.scripts.readConf import readConfig
21 20 from commons.api.doLogin import doLogin
22 21  
23 22  
... ...
testCase/cardSystem/test_pwdModify.py
... ... @@ -13,14 +13,12 @@
13 13 import unittest
14 14 import random
15 15 import time
16   -import json
17   -import math
18 16 import commons.api.cardStorageIn as cSI
19 17 import commons.api.returnCard as reC
20 18 import commons.api.cardStorageOut as cSO
21 19 import commons.api.openCard as oMC
22 20 import commons.api.operatePwd as operatePwd
23   -from commons.readConf import readConfig
  21 +from commons.scripts.readConf import readConfig
24 22 from commons.api.doLogin import doLogin
25 23  
26 24 class test_pwdModify(unittest.TestCase):
... ...
testCase/cardSystem/test_pwdReset.py
... ... @@ -14,14 +14,12 @@
14 14 import unittest
15 15 import random
16 16 import time
17   -import json
18   -import math
19 17 import commons.api.cardStorageIn as cSI
20 18 import commons.api.returnCard as reC
21 19 import commons.api.cardStorageOut as cSO
22 20 import commons.api.openCard as oMC
23 21 import commons.api.operatePwd as oP
24   -from commons.readConf import readConfig
  22 +from commons.scripts.readConf import readConfig
25 23 from commons.api.doLogin import doLogin
26 24  
27 25 class test_pwdModify(unittest.TestCase):
... ...