Exemplo n.º 1
0
 def setUpClass(cls):
     cls.http = HttpHandler()
     cls.lib = BusinessApi()
     cls.mysql = MysqlData()
     cls.config = Config()
     cls.randomc = Random_Chinese()
     cls.user = cls.lib.get_token()
Exemplo n.º 2
0
    def __init__(self):
        super(BusinessApi, self).__init__()
        self.http = HttpHandler()
        self.config = Config()
        self.read = ExcelData
        self.mysql = MysqlData()

        self.url = self.config.get_config('HTTP', 'baseurl')  # 4.0PC网站地址
        self.appapi_url = self.config.get_config('HTTP',
                                                 'appapi')  # 4.0-appapi接口地址
        self.webapi_url = self.config.get_config('HTTP',
                                                 'webapi')  # 4.0-webapi接口地址
        self.username = self.config.get_config('DATABASE', 'username')
        self.password = self.config.get_config('DATABASE', 'password')
        self.login_path = self.config.get_config('DATABASE',
                                                 'login_path')  # 登录接口API

        self.data_address = self.config.get_config('DATABASE', 'data_address')
        self.port = self.config.get_config('HTTP', 'port')

        self.post_data = {
            "cmd": "login",
            "params": {
                "login_type": "a7d3bbc5-dcb7-53ff-2df1-af203a832b52",
                "account": self.username,
                "password": self.password,
                "openid": ""
            }
        }
Exemplo n.º 3
0
 def __init__(self):
     super(UserData, self).__init__()
     self.mysql = MysqlData()
     self.http = HttpHandler()
     self.config = Config()
     self.url_4 = self.config.get_config('HTTP', 'baseurl_dev') # 4.0接口地址
     self.login_path = self.config.get_config('DATABASE', 'login_path') # 登录接口API
Exemplo n.º 4
0
 def setUpClass(cls):
     # 类方法之前执行
     cls.http = HttpHandler()
     cls.lib = BusinessApi()
     cls.mysql = MysqlData()
     cls.config = Config()
     cls.right_start = [
         '130', '131', '132', '133', '134', '135', '136', '137', '138',
         '139', '145', '146', '147', '148', '149', '150', '151', '152',
         '153', '155', '156', '157', '158', '159', '165', '166', '171',
         '172', '173', '174', '175', '176', '177', '178', '180', '181',
         '182', '183', '184', '185', '186', '187', '188', '189', '191',
         '198', '199'
     ]
     cls.error_start = [
         '100', '101', '102', '103', '104', '105', '106', '107', '108',
         '109', '110', '111', '112', '113', '114', '115', '116', '117',
         '118', '119', '120', '121', '122', '123', '124', '125', '126',
         '127', '128', '129', '140', '141', '142', '143', '144', '154',
         '160', '161', '162', '163', '164', '167', '168', '169', '170',
         '179', '190', '192', '193', '194', '195', '196', '197'
     ]
Exemplo n.º 5
0
 def setUpClass(cls):
     cls.http = HttpHandler()
     cls.lib = BusinessApi()
     cls.mysql = MysqlData()
     cls.config = Config()
Exemplo n.º 6
0
 def setUxxlass(cls):
     cls.http = HttpHandler()
     cls.lib = BusinessApi()
     cls.mysql = MysqlData()
     cls.config = Config()
     cls.user = cls.lib.get_token()