Commit 216c93bc755f2225c36209b955377d8bd94441dc

Authored by lixi
1 parent da9becfb

维护faker的注释

commons/Faker.py
... ... @@ -85,20 +85,20 @@ class random_data():
85 85  
86 86  
87 87  
88   -a=random_data()
89   -print(a.date())
90   -print(a.name())
91   -print(a.identity_card())
92   -print(a.plate())
93   -print(a.plate_cn(6))
94   -print(a.country())
95   -print(a.province())
96   -print(a.city())
97   -print(a.district())
98   -print(a.address())
99   -print(a.phone_number())
100   -print(a.email())
101   -print(a.longitude())
102   -print(a.latitude())
103   -print(a.credit_card_number())
  88 +# a=random_data()
  89 +# print(a.date())
  90 +# print(a.name())
  91 +# print(a.identity_card())
  92 +# print(a.plate())
  93 +# print(a.plate_cn(6))
  94 +# print(a.country())
  95 +# print(a.province())
  96 +# print(a.city())
  97 +# print(a.district())
  98 +# print(a.address())
  99 +# print(a.phone_number())
  100 +# print(a.email())
  101 +# print(a.longitude())
  102 +# print(a.latitude())
  103 +# print(a.credit_card_number())
104 104  
... ...
testcase/FeedbackCustomerController/fc_add.py
1 1 import unittest
2 2 import urllib3
3 3 from commons import common as com
4   -from commons.MySession import my
  4 +from commons.MySession import my,sy1
5 5 from commons.api.fc_add import fc_add
6 6 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
7 7 from commons.Faker import random_data
... ... @@ -19,7 +19,7 @@ class test_fc_add(unittest.TestCase):
19 19 CardTemp=888810054630","relationCardTemp=888810054630").replace("relationalCard[0].cardNumber\
20 20 =888810054630","relationalCard[0].cardNumber=888810054630")
21 21 print(body)
22   - re = my.post(url=fc.url, headers=fc.header, data=body.encode('utf-8'))
  22 + re = sy1.post(url=fc.url, headers=fc.header, data=body.encode('utf-8'))
23 23 print(re.headers)
24 24 print(re.json())
25 25 self.assertTrue("操作成功" in str(re.json()))
... ...
testcase/FeedbackCustomerController/fc_edit.py
1 1 import unittest
2 2 import urllib3
3 3 from commons import common as com
4   -from commons.MySession import my
  4 +from commons.MySession import my,sy1
5 5 from commons.api.fc_edit import fc_edit
6 6 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
7 7  
... ... @@ -18,7 +18,7 @@ class test_fc_edit(unittest.TestCase):
18 18 body = fc.body.replace("relationalCard[0].cardNumber=210720131533",\
19 19 "relationalCard[0].cardNumber=210720125142")
20 20 print(body)
21   - re = my.post(url=fc.url, headers=fc.header, data=body.encode('utf-8'))
  21 + re = sy1.post(url=fc.url, headers=fc.header, data=body.encode('utf-8'))
22 22 print(re.headers)
23 23 print(re.json())
24 24 self.assertTrue("操作成功" in str(re.json()))
... ...
testcase/FeedbackCustomerController/fc_view.py
... ... @@ -2,7 +2,7 @@ import unittest
2 2 import urllib3
3 3 import commons.ConfigDB as db
4 4 from commons import common as com
5   -from commons.MySession import my
  5 +from commons.MySession import my,sy1
6 6 from commons.api.fc_view import fc_view
7 7 from commons.api.fc_add import fc_add
8 8 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
... ... @@ -31,7 +31,7 @@ class test_fc_view(unittest.TestCase):
31 31 url = vi.url.replace("40", str(self.code))
32 32 print("数据处理后的url", url)
33 33 # 进行GET请求
34   - re = my.get(url=url, headers=vi.header)
  34 + re = sy1.get(url=url, headers=vi.header)
35 35 # 打印请求结果(可删除该代码,一般只在调试时使用)
36 36 print(re.text)
37 37 # 断言响应数据中是否存在期望字符串
... ...