1 Star 0 Fork 9

快乐天唐/Project_Managerment

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.py 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
ju-do-it 提交于 2019-02-22 21:19 . 调试功能管理中的细节
import re
#
# requestUrl = 'http://xmgl.zhugeyingxiao.com/api/testCaseGroup/update/6?user_id'
#
#
#
# get_canshu = requestUrl.split('?')[1]
#
# num = re.sub(r'\?.*$', "", requestUrl)
# canshu = num[num.rfind('/'):]
#
# print('canshu--> ', canshu)
#
testCase = 56
#
# requestUrl = requestUrl.replace(canshu.strip(), testCase)
#
# print('requestUrl--> ', requestUrl)
#
# requestUrl = 'http://127.0.0.1:8001/api/testCaseDetaile/update/55555?beforeTaskId=2&rand_str=f2dd5cd6544a39a82d437bfa1bf8216a&timestamp=1547013904167&user_id=7'
#
#
#
# num = re.sub(r'\?.*$', "", requestUrl)
# canshu = num[num.rfind('/'):]
# requestUrl = requestUrl.replace(canshu.strip(), '/' + str(testCase))
#
#
# print(requestUrl)
requestUrl = 'http://127.0.0.1:8008/api/posters/add/2?timestamp=1545822031837&user_id=1&rand_str=32a223a50f2262a9417a4d498ea3394f&time_stamp=1548659065'
num = re.sub(r'\?.*$', "", requestUrl)
canshu = num[num.rfind('/'):] # URL ID
case = canshu
print(case)
if canshu == '/0':
case = '/' + str(testCase)
requestUrl = requestUrl.replace(canshu.strip(), case)
print(requestUrl)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/happy-tiantang/Project_Managerment.git
[email protected]:happy-tiantang/Project_Managerment.git
happy-tiantang
Project_Managerment
Project_Managerment
master

搜索帮助