type: 收敛测试 schemas 与协议层类型
This commit is contained in:
@@ -54,7 +54,7 @@ class TestEliteLockExchange:
|
||||
|
||||
assert result["order_id"] == "5874"
|
||||
assert result["exchange_id"] == "11098933"
|
||||
assert self.client.csrf_token.call_count == 2
|
||||
assert self.client.__dict__["csrf_token"].call_count == 2
|
||||
create_call, pay_call = self.client._request_json.call_args_list
|
||||
assert create_call.args[:3] == (
|
||||
"post",
|
||||
|
||||
@@ -80,7 +80,9 @@ class TestDouyuProxyMode:
|
||||
|
||||
# 每任务取新代理:_client 也会再 fetch 一次(客户端构造即取代理)
|
||||
fake.fetch_new_proxy.return_value = "http://10.0.0.3:3128"
|
||||
assert runner._proxies_for_task()["http"] == "http://10.0.0.3:3128"
|
||||
refreshed = runner._proxies_for_task()
|
||||
assert refreshed is not None
|
||||
assert refreshed["http"] == "http://10.0.0.3:3128"
|
||||
assert fake.fetch_new_proxy.call_count == 3
|
||||
|
||||
def test_api_mode_failure_falls_back_to_direct(self):
|
||||
|
||||
@@ -226,6 +226,7 @@ class TestHuyaAppLogin:
|
||||
.filter(HuyaAccount.username == "mock_test_huya_user")
|
||||
.first()
|
||||
)
|
||||
assert acc is not None
|
||||
batch_req = HuyaPasswordLoginSelectedRequest(account_ids=[acc.id])
|
||||
batch_resp = app_password_login_selected_accounts(
|
||||
req=batch_req, db=self.session, current=self.admin
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import pytest
|
||||
import base64
|
||||
import json
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -69,7 +70,7 @@ class TestParseResponse:
|
||||
def test_parse_golden_evidence(self):
|
||||
"""真实抓包模板响应必须可解析 (证据: evidence/dfp_chain_golden.json)。"""
|
||||
if not CHAIN_FILE.exists():
|
||||
self.skipTest("缺失 golden 注册链模板")
|
||||
pytest.skip("缺失 golden 注册链模板")
|
||||
data = json.loads(CHAIN_FILE.read_text(encoding="utf-8"))
|
||||
resp = base64.b64decode(data["dfpReport"]["resp_b64"])
|
||||
t1, t2, t5 = _parse_response(resp)
|
||||
|
||||
@@ -96,11 +96,11 @@ class TestMigrationSmoke:
|
||||
missing_columns = model_columns - db_columns
|
||||
assert not missing_columns
|
||||
|
||||
db_indexes = {
|
||||
index["name"]
|
||||
for index in inspector.get_indexes(name)
|
||||
if not index["name"].startswith("sqlite_autoindex")
|
||||
}
|
||||
db_indexes = set()
|
||||
for index in inspector.get_indexes(name):
|
||||
index_name = index["name"]
|
||||
if index_name and not index_name.startswith("sqlite_autoindex"):
|
||||
db_indexes.add(index_name)
|
||||
all_db_indexes |= db_indexes
|
||||
model_indexes = {
|
||||
index.name for index in table.indexes if index.name
|
||||
|
||||
Reference in New Issue
Block a user