Commit 190d18d238e54f3cb99f2a5c7b9dd62852adbf5a
1 parent
9383e4dc
更新
Showing
16 changed files
with
15 additions
and
38 deletions
commons/api/cardLostAndUnLost.py
@@ -12,7 +12,6 @@ | @@ -12,7 +12,6 @@ | ||
12 | 12 | ||
13 | import requests | 13 | import requests |
14 | import json | 14 | import json |
15 | -from commons.readConf import readConfig | ||
16 | from commons.scripts import dealContentType as dCT | 15 | from commons.scripts import dealContentType as dCT |
17 | 16 | ||
18 | def getAccountInfo(gatewayHost=None,clientHeaders=None,cardNo=None): | 17 | def getAccountInfo(gatewayHost=None,clientHeaders=None,cardNo=None): |
commons/api/cardStock.py
commons/api/cardStorageIn.py
commons/api/doLogin.py
commons/clientSession.py
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | 11 | ||
12 | import requests | 12 | import requests |
13 | import json | 13 | import json |
14 | -from commons.readConf import readConfig | 14 | +from commons.scripts.readConf import readConfig |
15 | 15 | ||
16 | class cliSession(object): | 16 | class cliSession(object): |
17 | def __init__(self): | 17 | def __init__(self): |
commons/readConf.py renamed to commons/scripts/readConf.py
@@ -22,7 +22,7 @@ class readConfig(object): | @@ -22,7 +22,7 @@ class readConfig(object): | ||
22 | self.file_name = r'test_config_hg' | 22 | self.file_name = r'test_config_hg' |
23 | self.relative_path = r'/config/marketConfig/' | 23 | self.relative_path = r'/config/marketConfig/' |
24 | self.file_path = os.path.abspath( | 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 | print(self.file_path) | 26 | print(self.file_path) |
27 | self.conf.read(self.file_path,encoding="utf-8") | 27 | self.conf.read(self.file_path,encoding="utf-8") |
28 | 28 |
report/test.log
testCase/cardSystem/test_addCard.py
@@ -10,16 +10,14 @@ | @@ -10,16 +10,14 @@ | ||
10 | """ | 10 | """ |
11 | 11 | ||
12 | import unittest | 12 | import unittest |
13 | -import requests | ||
14 | import time | 13 | import time |
15 | -import json | ||
16 | import math | 14 | import math |
17 | import commons.api.cardStorageIn as cSI | 15 | import commons.api.cardStorageIn as cSI |
18 | import commons.api.cardStock as cS | 16 | import commons.api.cardStock as cS |
19 | import commons.api.cardStorageOut as cSO | 17 | import commons.api.cardStorageOut as cSO |
20 | -from commons.readConf import readConfig | 18 | +from commons.scripts.readConf import readConfig |
21 | from commons.api.doLogin import doLogin | 19 | from commons.api.doLogin import doLogin |
22 | -from commons.MySession import mysession | 20 | + |
23 | 21 | ||
24 | class test_addCard(unittest.TestCase): | 22 | class test_addCard(unittest.TestCase): |
25 | @classmethod | 23 | @classmethod |
testCase/cardSystem/test_cardStorage.py
@@ -11,14 +11,12 @@ | @@ -11,14 +11,12 @@ | ||
11 | """ | 11 | """ |
12 | 12 | ||
13 | import unittest | 13 | import unittest |
14 | -import requests | ||
15 | import time | 14 | import time |
16 | -import json | ||
17 | import math | 15 | import math |
18 | import commons.api.cardStorageIn as cSI | 16 | import commons.api.cardStorageIn as cSI |
19 | import commons.api.cardStock as cS | 17 | import commons.api.cardStock as cS |
20 | import commons.api.cardStorageOut as cSO | 18 | import commons.api.cardStorageOut as cSO |
21 | -from commons.readConf import readConfig | 19 | +from commons.scripts.readConf import readConfig |
22 | from commons.api.doLogin import doLogin | 20 | from commons.api.doLogin import doLogin |
23 | 21 | ||
24 | class test_cardStorage(unittest.TestCase): | 22 | class test_cardStorage(unittest.TestCase): |
testCase/cardSystem/test_changeCard.py
@@ -11,17 +11,14 @@ | @@ -11,17 +11,14 @@ | ||
11 | """ | 11 | """ |
12 | 12 | ||
13 | import unittest | 13 | import unittest |
14 | -import requests | ||
15 | import time | 14 | import time |
16 | -import json | ||
17 | -import math | ||
18 | import commons.api.cardStorageIn as cSI | 15 | import commons.api.cardStorageIn as cSI |
19 | import commons.api.returnCard as reC | 16 | import commons.api.returnCard as reC |
20 | import commons.api.cardStorageOut as cSO | 17 | import commons.api.cardStorageOut as cSO |
21 | import commons.api.openCard as oMC | 18 | import commons.api.openCard as oMC |
22 | import commons.api.cardStock as cS | 19 | import commons.api.cardStock as cS |
23 | import commons.api.changeCard as cC | 20 | import commons.api.changeCard as cC |
24 | -from commons.readConf import readConfig | 21 | +from commons.scripts.readConf import readConfig |
25 | from commons.api.doLogin import doLogin | 22 | from commons.api.doLogin import doLogin |
26 | 23 | ||
27 | class tset_changeCard(unittest.TestCase): | 24 | class tset_changeCard(unittest.TestCase): |
testCase/cardSystem/test_lossCard.py
@@ -11,16 +11,13 @@ | @@ -11,16 +11,13 @@ | ||
11 | """ | 11 | """ |
12 | 12 | ||
13 | import unittest | 13 | import unittest |
14 | -import requests | ||
15 | import time | 14 | import time |
16 | -import json | ||
17 | -import math | ||
18 | import commons.api.cardStorageIn as cardStorageIn | 15 | import commons.api.cardStorageIn as cardStorageIn |
19 | import commons.api.returnCard as returnCard | 16 | import commons.api.returnCard as returnCard |
20 | import commons.api.cardStorageOut as cardStorageOut | 17 | import commons.api.cardStorageOut as cardStorageOut |
21 | import commons.api.openCard as openCard | 18 | import commons.api.openCard as openCard |
22 | import commons.api.cardLostAndUnLost as cardLostAndUnLost | 19 | import commons.api.cardLostAndUnLost as cardLostAndUnLost |
23 | -from commons.readConf import readConfig | 20 | +from commons.scripts.readConf import readConfig |
24 | from commons.api.doLogin import doLogin | 21 | from commons.api.doLogin import doLogin |
25 | 22 | ||
26 | class test_lossCardAndUn(unittest.TestCase): | 23 | class test_lossCardAndUn(unittest.TestCase): |
testCase/cardSystem/test_openMasterCard.py
@@ -11,10 +11,7 @@ | @@ -11,10 +11,7 @@ | ||
11 | """ | 11 | """ |
12 | 12 | ||
13 | import unittest | 13 | import unittest |
14 | -import requests | ||
15 | import time | 14 | import time |
16 | -import json | ||
17 | -import math | ||
18 | import commons.api.cardStorageIn as cSI | 15 | import commons.api.cardStorageIn as cSI |
19 | import commons.api.returnCard as reC | 16 | import commons.api.returnCard as reC |
20 | import commons.api.cardStorageOut as cSO | 17 | import commons.api.cardStorageOut as cSO |
@@ -22,7 +19,7 @@ import commons.api.openCard as oMC | @@ -22,7 +19,7 @@ import commons.api.openCard as oMC | ||
22 | import commons.api.cardStock as cS | 19 | import commons.api.cardStock as cS |
23 | from commons.scripts.createIdNum import cIN | 20 | from commons.scripts.createIdNum import cIN |
24 | from commons.api.doLogin import doLogin | 21 | from commons.api.doLogin import doLogin |
25 | -from commons.readConf import readConfig | 22 | +from commons.scripts.readConf import readConfig |
26 | 23 | ||
27 | class tset_openMasterCard(unittest.TestCase): | 24 | class tset_openMasterCard(unittest.TestCase): |
28 | def setUp(self) -> None: | 25 | def setUp(self) -> None: |
testCase/cardSystem/test_openSlaveCard.py
@@ -11,17 +11,14 @@ | @@ -11,17 +11,14 @@ | ||
11 | """ | 11 | """ |
12 | 12 | ||
13 | import unittest | 13 | import unittest |
14 | -import requests | ||
15 | import time | 14 | import time |
16 | -import json | ||
17 | -import math | ||
18 | import commons.api.cardStorageIn as cSI | 15 | import commons.api.cardStorageIn as cSI |
19 | import commons.api.returnCard as reC | 16 | import commons.api.returnCard as reC |
20 | import commons.api.cardStorageOut as cSO | 17 | import commons.api.cardStorageOut as cSO |
21 | import commons.api.openCard as oMC | 18 | import commons.api.openCard as oMC |
22 | import commons.api.cardLostAndUnLost as cLAUL | 19 | import commons.api.cardLostAndUnLost as cLAUL |
23 | import commons.api.cardStock as cS | 20 | import commons.api.cardStock as cS |
24 | -from commons.readConf import readConfig | 21 | +from commons.scripts.readConf import readConfig |
25 | from commons.api.doLogin import doLogin | 22 | from commons.api.doLogin import doLogin |
26 | 23 | ||
27 | class tset_openMasterCard(unittest.TestCase): | 24 | class tset_openMasterCard(unittest.TestCase): |
testCase/cardSystem/test_outCard.py
@@ -13,11 +13,10 @@ | @@ -13,11 +13,10 @@ | ||
13 | import unittest | 13 | import unittest |
14 | import re | 14 | import re |
15 | import time | 15 | import time |
16 | -import json | ||
17 | import math | 16 | import math |
18 | import commons.api.cardStorageIn as cSI | 17 | import commons.api.cardStorageIn as cSI |
19 | import commons.api.cardStorageOut as cSO | 18 | import commons.api.cardStorageOut as cSO |
20 | -from commons.readConf import readConfig | 19 | +from commons.scripts.readConf import readConfig |
21 | from commons.api.doLogin import doLogin | 20 | from commons.api.doLogin import doLogin |
22 | 21 | ||
23 | 22 |
testCase/cardSystem/test_pwdModify.py
@@ -13,14 +13,12 @@ | @@ -13,14 +13,12 @@ | ||
13 | import unittest | 13 | import unittest |
14 | import random | 14 | import random |
15 | import time | 15 | import time |
16 | -import json | ||
17 | -import math | ||
18 | import commons.api.cardStorageIn as cSI | 16 | import commons.api.cardStorageIn as cSI |
19 | import commons.api.returnCard as reC | 17 | import commons.api.returnCard as reC |
20 | import commons.api.cardStorageOut as cSO | 18 | import commons.api.cardStorageOut as cSO |
21 | import commons.api.openCard as oMC | 19 | import commons.api.openCard as oMC |
22 | import commons.api.operatePwd as operatePwd | 20 | import commons.api.operatePwd as operatePwd |
23 | -from commons.readConf import readConfig | 21 | +from commons.scripts.readConf import readConfig |
24 | from commons.api.doLogin import doLogin | 22 | from commons.api.doLogin import doLogin |
25 | 23 | ||
26 | class test_pwdModify(unittest.TestCase): | 24 | class test_pwdModify(unittest.TestCase): |
testCase/cardSystem/test_pwdReset.py
@@ -14,14 +14,12 @@ | @@ -14,14 +14,12 @@ | ||
14 | import unittest | 14 | import unittest |
15 | import random | 15 | import random |
16 | import time | 16 | import time |
17 | -import json | ||
18 | -import math | ||
19 | import commons.api.cardStorageIn as cSI | 17 | import commons.api.cardStorageIn as cSI |
20 | import commons.api.returnCard as reC | 18 | import commons.api.returnCard as reC |
21 | import commons.api.cardStorageOut as cSO | 19 | import commons.api.cardStorageOut as cSO |
22 | import commons.api.openCard as oMC | 20 | import commons.api.openCard as oMC |
23 | import commons.api.operatePwd as oP | 21 | import commons.api.operatePwd as oP |
24 | -from commons.readConf import readConfig | 22 | +from commons.scripts.readConf import readConfig |
25 | from commons.api.doLogin import doLogin | 23 | from commons.api.doLogin import doLogin |
26 | 24 | ||
27 | class test_pwdModify(unittest.TestCase): | 25 | class test_pwdModify(unittest.TestCase): |