# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName:   test_58
# FileName:      conftest.py
# Author:       xxxxxxx
# Datetime:     2024/1/4 11:31
# Description:
# 主要创建自定固件
# ---------------------------------------------------------------------------
import pytest
from InterfaceAutoTest.common.db import DB
from InterfaceAutoTest.requests_method.requests_method import RequestsMethod


# 创建DB对象的自定义固件
@pytest.fixture(scope="session")
def db_fix():
    # 创建DB对象, 并返回
    db = DB()
    yield db
    db.close()


# 创建RequestsMethod类对象
@pytest.fixture(scope="session")
def req_fix():
    # 创建RequestsMethod类对象
    req = RequestsMethod()
    yield req