1 Star 2 Fork 3

Desireyang/future_loan_api_test_v3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
conftest.py 915 Bytes
一键复制 编辑 原始数据 按行查看 历史
# -*- coding: utf-8 -*-
# @Time : 2020/4/20 9:11
# @Author : Desire
# @Email : yangyin1106@163.com
# @Blog : https://www.cnblogs.com/desireyang/
# @File : conftest.py
# @Software: PyCharm
# Explain : pytest 存储测试夹具 fixture 的专用模块
import pytest
from common.DB_Handle import MySqlHandle
from common.Logging_Handle import log
from common.ParamRe_Handle import ReplaceData
@pytest.fixture(scope="class", autouse=True)
def set_class():
log.info("*" * 15 + "接口测试自动化启动" + "*" * 15)
yield
log.info("*" * 15 + "接口测试自动化结束" + "*" * 15)
@pytest.fixture(scope="class")
def invest_set_up():
# 查询数据库获取最新的投资项目id,和剩余可投金额
mh = MySqlHandle()
sql = 'SELECT MAX(id),amount FROM futureloan.loan WHERE `status`=2 AND amount>400;'
loan_id, amount = mh.find_one(sql)
yield loan_id, amount
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/desireyang/future_loan_api_test_v3.git
git@gitee.com:desireyang/future_loan_api_test_v3.git
desireyang
future_loan_api_test_v3
future_loan_api_test_v3
master

搜索帮助

Cb406eda 1850385 E526c682 1850385