test_add_integral.py 1.12 KB
import json
from atdd.ATDDCase import ATDDCase
import unittest


# 修改业务积分策略查询接口
class UpdateBusinessStrategy(ATDDCase):
    def setUp(self):
        pass

    # 同事圈-评论话题
    def test_update_business_strategy(self):
        header_json = {"Content-Type": "application/json; charset=utf-8"}
        url = self.uc_host + "/a/" + self.domain + "/" + self.app + "/qy/integral/change"
        data = {
            "memUid": self.jipeihong_uid,
            "remark": "调用接口增加100积分",
            "businessKey": "colleague_circle",
            "businessAct": "comment",
            "businessId": "123",
            "triggerTypes": [
                {
                    "triggerKey": "number",
                    "value": 2
                    },
                {
                    "triggerKey": "reply_business_num",
                    "value": 10
                }
            ]
        }
        print(url, json.dumps(data))
        result = self.post(url, None, json=data, headers=header_json)
        print(result.json())
        print(result)

if __name__ == '__main__':
    unittest.main()