随笔分类 - 老宅男_Python Requests
摘要:1、公共模块 > login.xls """ common (package) > ReadFile.py """ import xlrd class ReadExcel(): def __init__(self,file_path,sheetx): self.book = xlrd.open_wo
阅读全文
摘要:1.unittest框架 简单套入 unittest 框架 import requests import unittest class TestApi(unittest.TestCase): def setUp(self): self.apiurl = "http://www.xxxxx.com/c
阅读全文
摘要:1、get方法请求接口 url:显而易见,就是接口的地址url啦 headers:请求头,例如:content-type = application/x-www-form-urlencoded params:用于传递测试接口所要用的参数,这里我们用python中的字典形式(key:value)进行参
阅读全文