更新登录页及优化相关功能

This commit is contained in:
焦龙言
2026-10-08 14:13:05 +08:00
parent 9a14b692e3
commit 56e646bcc1
139 changed files with 77587 additions and 811 deletions
@@ -0,0 +1,27 @@
import unittest
from starlette.routing import Match
from module_business.controller.filling_controller import filling_controller
from module_business.controller.inbound_controller import inbound_controller
from module_business.controller.return_controller import return_controller
from module_business.controller.shipment_controller import shipment_controller
from module_business.controller.usage_controller import usage_controller
class TestScanPathIdentity(unittest.TestCase):
def test_scan_paths_preserve_printed_pallet_number_with_slashes(self) -> None:
for router in (
inbound_controller,
filling_controller,
shipment_controller,
usage_controller,
return_controller,
):
route = next(route for route in router.routes if '/scan/' in route.path)
# ASGI path 已由HTTP层解码,查询和片段字符不能再被当成URL语法。
path = route.path.split('/scan/')[0] + '/scan/托盘/2026?批#1'
with self.subTest(path=path):
match, child = route.matches({'type': 'http', 'method': 'GET', 'path': path, 'root_path': ''})
self.assertEqual(match, Match.FULL)
self.assertEqual(child['path_params']['qr_token'], '托盘/2026?批#1')