28 lines
482 B
Python
28 lines
482 B
Python
"""测试配置文件"""
|
|
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)
|