test_rule_not_open.py
1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import json
from atdd.ATDDCase import ATDDCase
from tests.Integral.publicMethods import PCpublicMethods
class RuleNotOpen(ATDDCase):
global list
app = 'studycenter'
url = ATDDCase().uc_host + '/a/' + ATDDCase().domain + '/' + ATDDCase().app + "/qy/integral/change"
businessKey = "invite_colleague"
triggerKeyDict = PCpublicMethods.PCpublicMethods().getTriggerKey(businessKey)
triggerValueDict = PCpublicMethods.PCpublicMethods().getTriggerValue(businessKey)
def setUp(self):
pass
# 邀请同事-审核驳回
def test_rule_not_open(self):
print(self.triggerKeyDict)
print(self.triggerValueDict)
data = {
"memUid": self.jipeihong_uid,
"businessKey": self.businessKey,
"businessAct": "review_reject",
"remark": "邀请同事-审核驳回",
"businessId": "55",
"triggerTypes": [
{
"triggerKey": "number", # 次数(循环类型) 全局
"value": self.triggerValueDict['review_reject-number'][0]['condition']
}
]
}
result = self.post(self.url, json.dumps(data), headers=self.header_json)
code = result.json()['code']
print(result.json())
self.assertEquals(code, 'INTEGRAL_RULE_NDAYOT_OPEN') # 积分策略没有启用