39 lines
981 B
Python
39 lines
981 B
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(r"D:\www\sport-era\admin")
|
|
MATCH_API = ROOT / "src" / "api" / "match.ts"
|
|
MATCH_INDEX = ROOT / "src" / "views" / "match" / "lists" / "index.vue"
|
|
MATCH_LIVE_TABLE = ROOT / "src" / "views" / "match" / "lists" / "components" / "MatchLiveTable.vue"
|
|
|
|
|
|
def assert_contains(path: Path, needle: str) -> None:
|
|
content = path.read_text(encoding="utf-8")
|
|
assert needle in content, f"{path} missing: {needle}"
|
|
|
|
|
|
def main() -> None:
|
|
assert_contains(MATCH_INDEX, 'type="expand"')
|
|
assert_contains(MATCH_INDEX, "MatchLiveTable")
|
|
|
|
for needle in (
|
|
"matchLiveLists",
|
|
"matchLiveAdd",
|
|
"matchLiveEdit",
|
|
"matchLiveDelete",
|
|
):
|
|
assert_contains(MATCH_API, needle)
|
|
|
|
for needle in (
|
|
"play_url_m3u8",
|
|
"fetch_status",
|
|
"source_url",
|
|
):
|
|
assert_contains(MATCH_LIVE_TABLE, needle)
|
|
|
|
print("match live admin static checks passed")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|