-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathconftest.py
More file actions
52 lines (48 loc) · 1.51 KB
/
Copy pathconftest.py
File metadata and controls
52 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from __future__ import annotations
from datetime import date
from typing import Any
import pytest
@pytest.fixture
def valid_catalog() -> dict[str, Any]:
paths = []
resources = []
for order, path_id in enumerate(
("foundations", "web-apis", "automation", "ai-agents"), start=1
):
paths.append(
{
"id": path_id,
"title_en": f"{path_id} title",
"title_zh": f"{path_id} 标题",
"summary_en": f"{path_id} summary",
"summary_zh": f"{path_id} 摘要",
"order": order,
}
)
resources.append(
{
"id": f"resource-{order}",
"path": path_id,
"title": f"Resource {order}",
"url": f"https://example{order}.com/docs/",
"source_type": "official-docs",
"level": "beginner",
"language": "en",
"why_en": "Primary documentation maintained by the project.",
"why_zh": "由项目维护的官方文档。",
"reviewed_on": date(2026, 8, 31),
"status": "active",
"requires_key": False,
"risk": "low",
"featured": order == 1,
"order": 1,
}
)
return {
"catalog": {
"reviewed_on": date(2026, 8, 31),
"status": "active",
"paths": paths,
},
"resources": resources,
}