修复:明确旧删除接口固定拒绝
This commit is contained in:
@@ -1263,6 +1263,21 @@ class TestPalletAndAssignmentControllers(unittest.IsolatedAsyncioTestCase):
|
||||
schema['paths']['/master/pallet/{pallet_id}/qrcode']['get']['responses']['200']['content'],
|
||||
)
|
||||
|
||||
def test_legacy_delete_openapi_declares_fixed_rejection(self) -> None:
|
||||
app = FastAPI()
|
||||
for router in self._routers():
|
||||
app.include_router(router)
|
||||
operation = app.openapi()['paths']['/master/pallet/{pallet_ids}']['delete']
|
||||
|
||||
self.assertEqual('兼容旧接口,固定拒绝,请使用测试数据批次清理', operation['summary'])
|
||||
self.assertEqual(
|
||||
'兼容旧接口,固定拒绝单条物理删除,请使用测试数据批次清理',
|
||||
operation['description'],
|
||||
)
|
||||
self.assertNotIn('用于删除', operation['description'])
|
||||
self.assertNotIn('尚未入库', operation['description'])
|
||||
self.assertNotIn('没有流转事件', operation['description'])
|
||||
|
||||
def test_route_response_models_are_exact(self) -> None:
|
||||
routes = self._routes()
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user