dy-dashboard/tests/test_planning_detail_scope.py
2026-10-28 11:14:17 +08:00

17 lines
717 B
Python

"""Plan detail tabs must distinguish overall and warehouse-specific metrics."""
from pathlib import Path
import unittest
class PlanningDetailScopeTest(unittest.TestCase):
def test_cloud_and_external_labels_are_scoped(self):
source = (Path(__file__).resolve().parents[1] / 'static/js/app.js').read_text(encoding='utf-8')
self.assertIn("scopedFieldLabel(cloudField, '云仓')", source)
self.assertIn("scopedFieldLabel(externalField, '外仓')", source)
self.assertIn("'库存可支撑天数': scope + '库存可支撑天数'", source)
self.assertIn('列表和导出的“库存可支撑天数”对应默认数据', source)
if __name__ == '__main__':
unittest.main()