Commit 29830d3f by taoke

添加用例

parent 9ff42bbe
......@@ -6,7 +6,7 @@ class BaseConfig():
# 请求头
headers = {'Content-Type': 'application/json'}
# 当前运行的产品名 #auto
current_name = "auto"
current_name = "bmc"
test_case_dir = "test_case/"
secs=0.1 # 测试用例间隔运行时间
......@@ -33,6 +33,7 @@ class BMCConfig(BaseConfig):
bmc_token = "" #公网加密token
bmc_pvt_token = "" #专网token
host = "http://testbmcapp.hikcreate.com" #bmc业务所有URL的host
test_pvthost = "http://testbmcpvtapp.hikcreate.com"
#bmc除登录外所有的header
headers = {
'City-Code': "520100",
......@@ -46,9 +47,9 @@ class BMCConfig(BaseConfig):
'Net': "wifi",
'OS-Type': "Android",
'OS-Version': "27",
'Pvt-Token': "",
'Pvt-Token': f"{bmc_pvt_token}",
'Resolution': "2034x1080",
'Token': "",
'Token': f"{bmc_token}",
'Version': "2.2.6"
}
#注册和注销专用账号
......
......@@ -14,10 +14,10 @@ def bmc_login_fixture():
indata = {"phone":"17822000000",
"encodedGesture": "67e6d10010533eed4bbe9659863bf6ee"}
res = BMC().bmc_login(indata)
# setattr(BMCConfig, 'bmc_token', res[0])
# setattr(BMCConfig, 'bmc_pvt_token', res[1])
BMCConfig.headers['Pvt-Token'] = res[1]
BMCConfig.headers['Token'] = res[0]
setattr(BMCConfig, 'bmc_token', res[0])
setattr(BMCConfig, 'bmc_pvt_token', res[1])
# BMCConfig.headers['Pvt-Token'] = res[1]
# BMCConfig.headers['Token'] = res[0]
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment