更新登录页及优化相关功能
This commit is contained in:
@@ -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')
|
||||
Reference in New Issue
Block a user