重组为 backend/clients/docs 三层结构,并清理 git 污染。

将后端迁入 backend/,完善根目录 .gitignore,删除误提交的 .mypy_cache 缓存文件。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin
2026-05-21 16:02:25 +08:00
parent 6bc6801df9
commit 1af442481e
142 changed files with 175 additions and 212 deletions

View File

@@ -0,0 +1,18 @@
from app.services.video.rtsp_redact import redact_rtsp_url
def test_redact_rtsp_url_with_credentials() -> None:
assert (
redact_rtsp_url("rtsp://admin:secret@10.0.0.1:554/Streaming/Channels/101")
== "rtsp://***@10.0.0.1:554/Streaming/Channels/101"
)
def test_redact_rtsp_url_without_credentials_unchanged() -> None:
url = "rtsp://10.0.0.1:554/Streaming/Channels/101"
assert redact_rtsp_url(url) == url
def test_redact_rtsp_url_empty() -> None:
assert redact_rtsp_url(None) == ""
assert redact_rtsp_url("") == ""