conftest.py 663 Bytes
Newer Older
antares committed
1 2 3 4 5 6 7 8 9 10
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName:   test62
# FileName:      conftest.py
# Author:       lao_zhao
# Datetime:     2024/9/4 15:43
# Description:
# 
# ---------------------------------------------------------------------------
import pytest
antares committed
11 12
from apiAutoTestV3.common.db import DB
from apiAutoTestV3.request_method.request_method import RequestMethod
antares committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28


# DB自定义固件
@pytest.fixture(scope="session")
def fix_db():
    db = DB()
    yield db
    db.close()


# RequestMethod自定义固件
@pytest.fixture(scope="session")
def fix_req():
    req = RequestMethod()
    yield req