first commi
This commit is contained in:
27
checker/tests/conftest.py
Normal file
27
checker/tests/conftest.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""测试配置文件"""
|
||||
import pytest
|
||||
import requests
|
||||
from checker import Card, StripeChecker
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_card():
|
||||
"""示例卡片fixture"""
|
||||
return Card(
|
||||
number="4111111111111111",
|
||||
month="12",
|
||||
year="2025",
|
||||
cvv="123"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def session():
|
||||
"""HTTP会话fixture"""
|
||||
return requests.Session()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def checker():
|
||||
"""检测器fixture"""
|
||||
return StripeChecker(timeout=15, max_retries=3)
|
||||
Reference in New Issue
Block a user