コード例 #1
0
    def test1_user_div(self):
        #set_url
        url = raed_xml
        raed_configHttp.set_url(url)
        print(raed_configHttp.set_url(url))

        #set_head
        header = {
            'Content-Type': raed_config.get_headers('Content-Type'),
            'token': raed_config.get_headers('token')
        }
        raed_configHttp.set_headers(header)
        print(raed_configHttp.set_headers(header))

        #set_data
        data = {
            "myDepartmentId": self.myDepartmentId,
            "parentId": self.parentId,
            "departmentName": self.departmentName
        }
        raed_configHttp.set_data(data)
        print(raed_configHttp.set_data(data))

        #请求接口
        self.response = raed_configHttp.HttpMethod(self.method)
        print(self.response.text)

        self.add_result()
コード例 #2
0
    def test1_user_div_info(self):
        #set_url
        url = raed_xml1
        raed_configHttp.set_url(url)
        print(raed_configHttp.set_url(url))

        #set_head
        header = {
            'Content-Type': raed_config.get_headers('Content-Type'),
            'token': raed_config.get_headers('token')
        }
        raed_configHttp.set_headers(header)
        print(raed_configHttp.set_headers(header))

        #set_data
        data = {}
        raed_configHttp.set_data(data)
        print(raed_configHttp.set_data(data))

        #请求接口
        self.response = raed_configHttp.HttpMethod(self.method)
        print(self.response.text)

        self.add_result()
コード例 #3
0
    def test1_staff_code(self):
        #set_url
        url = raed_xml
        raed_configHttp.set_url(url)
        print(raed_configHttp.set_url(url))

        #set_head
        header = {
            'Content-Type': raed_config.get_headers('Content-Type'),
            'token': raed_config.get_headers('token')
        }
        raed_configHttp.set_headers(header)
        print(raed_configHttp.set_headers(header))

        #set_data
        data = {"phone": self.phone, "sendType": self.sendType}
        raed_configHttp.set_data(data)
        print(raed_configHttp.set_data(data))

        #请求接口
        self.response = raed_configHttp.HttpMethod(self.method)
        print(self.response.text)

        self.add_result()