refactor: switch to free-trial/private-deploy/buyout pricing, fix feature gaps, add SEO landing + deploy config

This commit is contained in:
TradeMate Dev
2026-07-12 08:09:28 +08:00
parent 9ca5d79d8a
commit 04924e3bc4
36 changed files with 1026 additions and 975 deletions
+36
View File
@@ -0,0 +1,36 @@
import pytest
from httpx import AsyncClient
class TestLeadsAPI:
async def test_create_private_lead(self, client: AsyncClient):
res = await client.post(
"/api/v1/leads",
json={
"type": "private",
"name": "张三",
"company": "测试外贸公司",
"phone": "13800138000",
"message": "想私有化部署",
},
)
assert res.status_code == 200
data = res.json()
assert data["type"] == "private"
assert data["status"] == "new"
assert data["id"]
async def test_create_buyout_lead(self, client: AsyncClient):
res = await client.post(
"/api/v1/leads",
json={"type": "buyout", "name": "李四", "phone": "13900139000"},
)
assert res.status_code == 200
assert res.json()["type"] == "buyout"
async def test_invalid_type_rejected(self, client: AsyncClient):
res = await client.post(
"/api/v1/leads",
json={"type": "wrong", "name": "x", "phone": "1"},
)
assert res.status_code == 400