随笔分类 -  老宅男_Python Requests

该文被密码保护。
posted @ 2020-01-01 19:10 一个老宅男 阅读(441) 评论(0) 推荐(0) 编辑
摘要:1、公共模块 > login.xls """ common (package) > ReadFile.py """ import xlrd class ReadExcel(): def __init__(self,file_path,sheetx): self.book = xlrd.open_wo 阅读全文
posted @ 2019-11-17 16:58 一个老宅男 阅读(1103) 评论(0) 推荐(0) 编辑
摘要:1.unittest框架 简单套入 unittest 框架 import requests import unittest class TestApi(unittest.TestCase): def setUp(self): self.apiurl = "http://www.xxxxx.com/c 阅读全文
posted @ 2019-11-15 15:37 一个老宅男 阅读(747) 评论(0) 推荐(0) 编辑
摘要:1、get方法请求接口 url:显而易见,就是接口的地址url啦 headers:请求头,例如:content-type = application/x-www-form-urlencoded params:用于传递测试接口所要用的参数,这里我们用python中的字典形式(key:value)进行参 阅读全文
posted @ 2019-10-17 23:34 一个老宅男 阅读(1360) 评论(0) 推荐(0) 编辑