65 行
3.8 KiB
Python
65 行
3.8 KiB
Python
# -*- coding: utf-8 -*-
|
||
"""
|
||
客户视角严谨度与大厂背书优化专项测试 (Client Rigor & Enterprise Trust Enhancements)
|
||
测试用例覆盖:
|
||
1. 标杆案例:具备微缩系统界面视窗/交互特征与联合终验背书
|
||
2. 资质合规:具备标准化权威认证编号(ISO9001/ISO27001/等保三级/国家软著登记号)
|
||
3. 演示沙箱:具备极速时效响应承诺(30分钟建联与7天专属脱敏沙箱)
|
||
"""
|
||
import os
|
||
import re
|
||
import unittest
|
||
|
||
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||
|
||
class TestClientRigorEnhancements(unittest.TestCase):
|
||
|
||
def setUp(self):
|
||
self.index_html_path = os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/index.html')
|
||
self.cases_html_path = os.path.join(ROOT_DIR, 'addons/official/view/web/official_case_show/list.html')
|
||
self.about_html_path = os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/single.html')
|
||
self.about_mobile_path = os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/single_e.html')
|
||
self.product_html_path = os.path.join(ROOT_DIR, 'addons/official/view/web/official_product/product_page.html')
|
||
|
||
with open(self.index_html_path, 'r', encoding='utf-8') as f:
|
||
self.index_html = f.read()
|
||
with open(self.cases_html_path, 'r', encoding='utf-8') as f:
|
||
self.cases_html = f.read()
|
||
with open(self.about_html_path, 'r', encoding='utf-8') as f:
|
||
self.about_html = f.read()
|
||
with open(self.about_mobile_path, 'r', encoding='utf-8') as f:
|
||
self.about_mobile = f.read()
|
||
with open(self.product_html_path, 'r', encoding='utf-8') as f:
|
||
self.product_html = f.read()
|
||
|
||
def test_case_interface_preview_and_acceptance(self):
|
||
"""标杆案例必须具备微缩系统界面特征与联合终验背书"""
|
||
# 案例页必须具备界面视窗或系统交互特征
|
||
self.assertTrue('nhc-case-preview-window' in self.cases_html or '系统功能界面' in self.cases_html or '界面预览' in self.cases_html,
|
||
"案例独立页必须包含系统功能界面视窗")
|
||
# 必须包含客户终验与上线运行凭证
|
||
self.assertTrue('联合终验' in self.cases_html or '平稳运行' in self.cases_html or '验收' in self.cases_html,
|
||
"案例独立页必须包含明确的验收与生产运行记录")
|
||
|
||
def test_authoritative_certifications_and_copyright_numbers(self):
|
||
"""关于我们资质板块必须展示规整的权威认证编号与等保合规"""
|
||
# ISO 与 等保
|
||
self.assertIn('ISO9001', self.about_html, "PC 关于我们必须包含 ISO9001 质量认证")
|
||
self.assertIn('ISO27001', self.about_html, "PC 关于我们必须包含 ISO27001 安全认证")
|
||
self.assertIn('等保三级', self.about_html, "PC 关于我们必须包含等保三级安全测评背书")
|
||
# 软著证书登记号规范
|
||
self.assertTrue(re.search(r'202\dSR\d{6,}', self.about_html),
|
||
"PC 关于我们必须展示真实的计算机软件著作权登记号示例 (如 2023SRxxxxxx)")
|
||
|
||
# 移动端同步
|
||
self.assertIn('ISO', self.about_mobile, "移动端关于我们必须同步展示权威资质")
|
||
self.assertIn('等保三级', self.about_mobile, "移动端关于我们必须同步展示等保三级")
|
||
|
||
def test_demo_sandbox_rigorous_commitment(self):
|
||
"""产品页演示沙箱必须具备极速建联与真实脱敏环境承诺"""
|
||
self.assertTrue('30分钟' in self.product_html or '专属演示账号' in self.product_html or '脱敏' in self.product_html,
|
||
"产品页沙箱必须承诺快速下发专属演示账号与脱敏数据环境")
|
||
|
||
if __name__ == '__main__':
|
||
unittest.main()
|