Commit 1cf65a78 by jiaqiying

add config for bmy

parent fb2e88fb
......@@ -3,7 +3,7 @@
import json
import logging
import requests
from config import BaseConfig, BMCConfig
from config import BaseConfig, BMCConfig, BmyConfig
def request_main(url, headers, method, data):
......@@ -33,7 +33,9 @@ def request_main(url, headers, method, data):
def get_case_dir(product_name):
"""根据传入的产品名来运行对应产品的测试用例目录"""
test_case_dir = BaseConfig.default_test_case_dir
test_case_dir = BaseConfig.name
if product_name == BMCConfig.name:
test_case_dir = BMCConfig.test_case_dir
if product_name == BmyConfig.name:
test_case_dir = BmyConfig.test_case_dir
return test_case_dir
\ No newline at end of file
......@@ -5,8 +5,8 @@ class BaseConfig():
# 请求头
headers = {'Content-Type': 'application/json; charset=utf-8'}
# 当前运行的产品名
current_product = "bmc"
default_test_case_dir = "test_case/bmc/"
name = "bmc"
test_case_dir = "test_case/bmc/"
salt = 'hikcreate_xj' # SSO 登录的东西
secs=0.1
......@@ -21,4 +21,6 @@ class BMCConfig(BaseConfig):
class BmyConfig(BaseConfig):
"""企业云的配置类"""
name = "bmy"
test_case_dir = "test_case/bmy/"
test_case_data_dir = "test_case_data/bmy/"
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