基于 skill-template 脚手架开发,包含: - payroll_config(费率配置,可编辑)+ payslip_snapshots(解析历史,只读)2 张业务表 - 全国默认 + 北上广 4 套费率(社保/公积金/个税起征点/7 级税率表) - 5 个业务 Action:calculate-payslip-simple / calculate-payslip-full / explain-term / view-config / edit-config - 个税累计预扣法计算,支持多月历史累加 - 20 个薪资名词库(社保/公积金/个税/全勤/加班费等) - 完整市场文档(README/TUTORIAL/DEMO/CHANGELOG) - 296 测试全部通过
24 lines
787 B
Plaintext
24 lines
787 B
Plaintext
# -*- coding: utf-8 -*-
|
||
# 样例:复制为 test_real_api_contract.py;需 OPENCLAW_TEST_TARGET=real_api。
|
||
"""真实 HTTP API(只读优先;默认跳过)。"""
|
||
from __future__ import annotations
|
||
|
||
import unittest
|
||
|
||
from adapter_test_utils import should_skip_profile
|
||
|
||
|
||
class TestRealApiContractSample(unittest.TestCase):
|
||
def test_skip_by_default(self) -> None:
|
||
skip, reason = should_skip_profile("real_api", write=False)
|
||
if skip:
|
||
raise unittest.SkipTest(reason)
|
||
# 写操作示例(复制后使用):
|
||
# skip_w, _ = should_skip_profile("real_api", write=True)
|
||
# 禁止在此文件写入真实 token;从 vault / 环境注入读取 endpoint。
|
||
self.assertFalse(skip)
|
||
|
||
|
||
if __name__ == "__main__":
|
||
unittest.main()
|