feat: initial import (exclude templates and runtime temp files)

This commit is contained in:
237899745
2026-02-27 15:21:15 +08:00
commit 0951732c7a
33 changed files with 11698 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
from __future__ import annotations
import unittest
from server import load_config, parse_records
class TestStatusAlias(unittest.TestCase):
def test_collect_external_bank_maps_to_collect_other_bank(self) -> None:
config = load_config()
raw_text = "#接龙\n21、 濂溪揽收外行5.3万存一年"
result = parse_records(raw_text, config, history=[])
records = result.get("new_records", [])
self.assertTrue(
any(
str(item.get("branch", "")) == "濂溪"
and str(item.get("type", "")) == "一年期定期"
and str(item.get("status", "")) == "揽收他行"
for item in records
)
)
def test_transfer_external_bank_maps_to_transfer_other_bank(self) -> None:
config = load_config()
raw_text = "#接龙\n22、 潇水南路挖转外行20万存半年"
result = parse_records(raw_text, config, history=[])
records = result.get("new_records", [])
self.assertTrue(
any(
str(item.get("branch", "")) == "潇水南路"
and str(item.get("type", "")) == "六个月定期"
and str(item.get("status", "")) == "他行挖转"
for item in records
)
)
if __name__ == "__main__":
unittest.main()