Commit 7484865ee388c06a150f056c6291148b79f2cb59
1 parent
9364bd51
add
Showing
7 changed files
with
256 additions
and
92 deletions
tests/Integral/UC_jifen/tes_default_list.py
... | ... | @@ -15,6 +15,7 @@ class DefaultList(ATDDCase): |
15 | 15 | header_json = {"Content-Type": "application/json; charset=utf-8"} |
16 | 16 | url = self.uc_host + '/a/' + self.domain + '/' + self.app + "/qy/integral/default/list" |
17 | 17 | data = { |
18 | + | |
18 | 19 | } |
19 | 20 | print(url, json.dumps(data)) |
20 | 21 | result = self.post(url, None, json=data, headers=header_json) | ... | ... |
tests/Integral/UC_xuefen/test_course_center.py
... | ... | @@ -15,6 +15,33 @@ class CourseCenter(ATDDCase): |
15 | 15 | def setUp(self): |
16 | 16 | pass |
17 | 17 | |
18 | + # 课程中心-单课程学习 | |
19 | + def test_one_learning(self): | |
20 | + data = { | |
21 | + "memUid": self.jipeihong_uid, | |
22 | + "businessKey": self.businessKey, | |
23 | + "businessAct": "one_learning", | |
24 | + "businessId": "2", | |
25 | + "triggerTypes": [ | |
26 | + | |
27 | + { | |
28 | + "triggerKey": "complete", # 完成(枚举类型)单个 | |
29 | + "value": 2, | |
30 | + "remark": "课程中心-单课程学习_完成(枚举类型)单个" | |
31 | + }, | |
32 | + { | |
33 | + "triggerKey": "number", # 完成单课程数(循环类型)全局 | |
34 | + "value": 2, | |
35 | + "remark": "课程中心-单课程学习_成单课程数(循环类型)全局", | |
36 | + } | |
37 | + ] | |
38 | + } | |
39 | + result = self.post(self.url, json.dumps(data), headers=self.header_json) | |
40 | + code = result.json()['code'] | |
41 | + self.assertNotEquals(code, 'INTEGRAL_RULE_NDAYOT_OPEN') # 积分策略没有启用 | |
42 | + self.assertEquals(code, 'SUCCESS') | |
43 | + print(result.json()) | |
44 | + | |
18 | 45 | # 课程中心-单课程测评 |
19 | 46 | def test_one_evaluation(self): |
20 | 47 | print(self.triggerKeyDict) |
... | ... | @@ -26,20 +53,27 @@ class CourseCenter(ATDDCase): |
26 | 53 | "memUid": self.jipeihong_uid, |
27 | 54 | "businessKey": self.businessKey, |
28 | 55 | "businessAct": "one_evaluation", |
29 | - "remark": "课程中心-单课程测评", | |
30 | - "businessId": "123", | |
56 | + "businessId": "111", | |
31 | 57 | "triggerTypes": [ |
32 | 58 | { |
33 | - "triggerKey": "pass", #通过(枚举类型)单个 | |
34 | - "value": self.triggerValueDict['one_evaluation-pass'][0]['condition'] | |
59 | + "triggerKey": "pass", # 通过(枚举类型)单个 | |
60 | + "value": self.triggerValueDict['one_evaluation-pass'][0]['condition'], | |
61 | + "remark": "课程中心-单课程测评" | |
62 | + }, | |
63 | + { | |
64 | + "triggerKey": "pass_rate", # 通过题数百分比(阈值类型)单个 | |
65 | + "value": self.triggerValueDict['one_evaluation-pass_rate'][0]['condition'], | |
66 | + "remark": "课程中心-单课程测评" | |
35 | 67 | }, |
36 | 68 | { |
37 | - "triggerKey": "pass_rate", #通过题数百分比(阈值类型)单个 | |
38 | - "value": self.triggerValueDict['one_evaluation-pass_rate'][0]['condition'] | |
69 | + "triggerKey": "pass_number", # 通过单课程数(循环类型)全局 | |
70 | + "value": self.triggerValueDict['one_evaluation-pass_number'][0]['condition'], | |
71 | + "remark": "课程中心-单课程测评" | |
39 | 72 | }, |
40 | 73 | { |
41 | - "triggerKey": "pass_number", #通过单课程数(循环类型)全局 | |
42 | - "value": self.triggerValueDict['one_evaluation-pass_number'][0]['condition'] | |
74 | + "triggerKey": "number", | |
75 | + "value": self.triggerValueDict['one_evaluation-number'][0]['condition'], | |
76 | + "remark": "课程中心-单课程测评" | |
43 | 77 | } |
44 | 78 | ] |
45 | 79 | } |
... | ... | @@ -49,8 +83,8 @@ class CourseCenter(ATDDCase): |
49 | 83 | self.assertEquals(code, 'SUCCESS') |
50 | 84 | print(result.json()) |
51 | 85 | |
52 | - # 课程中心-通过测评课程数 | |
53 | - def test_pass_exam_business(self): | |
86 | + # 课程中心-系列课程学习 | |
87 | + def test_child_learning(self): | |
54 | 88 | print(self.triggerKeyDict) |
55 | 89 | print("\n") |
56 | 90 | print(self.triggerValueDict) |
... | ... | @@ -58,13 +92,18 @@ class CourseCenter(ATDDCase): |
58 | 92 | data = { |
59 | 93 | "memUid": self.jipeihong_uid, |
60 | 94 | "businessKey": self.businessKey, |
61 | - "businessAct": "pass_exam_business", | |
62 | - "remark": "课程中心-通过测评课程数", | |
63 | - "businessId": "456", | |
95 | + "businessAct": "child_learning", | |
96 | + "businessId": "12334", | |
64 | 97 | "triggerTypes": [ |
65 | 98 | { |
66 | - "triggerKey": "pass_exam_business_num", # 通过测评课程数(循环类型)全局 | |
67 | - "value": self.triggerValueDict['pass_exam_business-pass_exam_business_num'][0]['condition'] | |
99 | + "triggerKey": "complete", # 通过(枚举类型)单个 | |
100 | + "value": self.triggerValueDict['child_learning-complete'][0]['condition'], | |
101 | + "remark": "课程中心-系列课程学习" | |
102 | + }, | |
103 | + { | |
104 | + "triggerKey": "complete_number", # 通过题数百分比(阈值类型)单个 | |
105 | + "value": self.triggerValueDict['child_learning-complete_number'][0]['condition'], | |
106 | + "remark": "课程中心-系列课程学习" | |
68 | 107 | } |
69 | 108 | ] |
70 | 109 | } |
... | ... | @@ -74,27 +113,23 @@ class CourseCenter(ATDDCase): |
74 | 113 | self.assertEquals(code, 'SUCCESS') |
75 | 114 | print(result.json()) |
76 | 115 | |
77 | - | |
78 | - # 课程中心-系列课程测评 | |
79 | - def test_child_evaluation(self): | |
116 | + # 课程中心-系列课程子课程测评 | |
117 | + def test_series_child_evaluation(self): | |
80 | 118 | data = { |
81 | 119 | "memUid": self.jipeihong_uid, |
82 | 120 | "businessKey": self.businessKey, |
83 | - "businessAct": "child_evaluation", | |
84 | - "remark": "课程中心-系列课程测评", | |
121 | + "businessAct": "series_child_evaluation", | |
85 | 122 | "businessId": "22", |
86 | 123 | "triggerTypes": [ |
87 | 124 | { |
88 | 125 | "triggerKey": "pass", # 通过(枚举类型)单个 |
89 | - "value": 2 | |
126 | + "value": self.triggerValueDict['series_child_evaluation-pass'][0]['condition'], | |
127 | + "remark": "课程中心-系列课程子课程测评" | |
90 | 128 | }, |
91 | 129 | { |
92 | 130 | "triggerKey": "pass_rate", # 通过题数百分比(阈值类型)单个 |
93 | - "value": 2 | |
94 | - }, | |
95 | - { | |
96 | - "triggerKey": "pass_number", # 通过系列课程数(循环类型)全局 | |
97 | - "value": 2 | |
131 | + "value": self.triggerValueDict['series_child_evaluation-pass_rate'][0]['condition'], | |
132 | + "remark": "课程中心-系列课程子课程测评" | |
98 | 133 | } |
99 | 134 | ] |
100 | 135 | } |
... | ... | @@ -104,24 +139,28 @@ class CourseCenter(ATDDCase): |
104 | 139 | self.assertEquals(code, 'SUCCESS') |
105 | 140 | print(result.json()) |
106 | 141 | |
107 | - | |
108 | - | |
109 | - # 课程中心-系列课程学习 | |
110 | - def test_child_learning(self): | |
142 | + # 课程中心-系列课程测评 | |
143 | + def test_child_evaluation(self): | |
111 | 144 | data = { |
112 | 145 | "memUid": self.jipeihong_uid, |
113 | 146 | "businessKey": self.businessKey, |
114 | - "businessAct": "child_learning", | |
115 | - "remark": "课程中心-系列课程学习", | |
116 | - "businessId": "1", | |
147 | + "businessAct": "child_evaluation", | |
148 | + "businessId": "22", | |
117 | 149 | "triggerTypes": [ |
118 | 150 | { |
119 | - "triggerKey": "complete", # 完成(枚举类型)单个 | |
120 | - "value": 2 | |
151 | + "triggerKey": "pass", | |
152 | + "value": 2, | |
153 | + "remark": "课程中心-系列课程测评" | |
154 | + }, | |
155 | + { | |
156 | + "triggerKey": "pass_rate", | |
157 | + "value": 2, | |
158 | + "remark": "课程中心-系列课程测评" | |
121 | 159 | }, |
122 | 160 | { |
123 | - "triggerKey": "complete_number", # 完成系列课程数(循环类型)全局 | |
124 | - "value": 2 | |
161 | + "triggerKey": "pass_number", | |
162 | + "value": 2, | |
163 | + "remark": "课程中心-系列课程测评" | |
125 | 164 | } |
126 | 165 | ] |
127 | 166 | } |
... | ... | @@ -131,7 +170,6 @@ class CourseCenter(ATDDCase): |
131 | 170 | self.assertEquals(code, 'SUCCESS') |
132 | 171 | print(result.json()) |
133 | 172 | |
134 | - | |
135 | 173 | # 课程中心-学习时长 |
136 | 174 | def test_learned_time(self): |
137 | 175 | data = { |
... | ... | @@ -139,11 +177,11 @@ class CourseCenter(ATDDCase): |
139 | 177 | "businessId": "1", |
140 | 178 | "businessKey": self.businessKey, |
141 | 179 | "businessAct": "learned_time", |
142 | - "remark": "课程中心-学习时长", | |
143 | 180 | "triggerTypes": [ |
144 | 181 | { |
145 | 182 | "triggerKey": "learned_time_total", # 时长(循环类型)全局 |
146 | - "value": 2 | |
183 | + "value": 2, | |
184 | + "remark": "课程中心-学习时长" | |
147 | 185 | } |
148 | 186 | ] |
149 | 187 | } |
... | ... | @@ -153,19 +191,18 @@ class CourseCenter(ATDDCase): |
153 | 191 | self.assertEquals(code, 'SUCCESS') |
154 | 192 | print(result.json()) |
155 | 193 | |
156 | - | |
157 | 194 | # 课程中心-点赞课程 |
158 | 195 | def test_like(self): |
159 | 196 | data = { |
160 | 197 | "memUid": self.jipeihong_uid, |
161 | 198 | "businessKey": self.businessKey, |
162 | 199 | "businessAct": "like", |
163 | - "remark": "课程中心-点赞课程", | |
164 | 200 | "businessId": "1", |
165 | 201 | "triggerTypes": [ |
166 | 202 | { |
167 | 203 | "triggerKey": "like_num", # 次数(循环类型)全局 |
168 | - "value": 2 | |
204 | + "value": 2, | |
205 | + "remark": "课程中心-点赞课程" | |
169 | 206 | } |
170 | 207 | ] |
171 | 208 | } |
... | ... | @@ -175,19 +212,18 @@ class CourseCenter(ATDDCase): |
175 | 212 | self.assertEquals(code, 'SUCCESS') |
176 | 213 | print(result.json()) |
177 | 214 | |
178 | - | |
179 | - # 课程中心-收藏课程 | |
215 | + # 课程中心-收藏课程 | |
180 | 216 | def test_collect(self): |
181 | 217 | data = { |
182 | 218 | "memUid": self.jipeihong_uid, |
183 | 219 | "businessKey": self.businessKey, |
184 | 220 | "businessAct": "collect_num", |
185 | - "remark": "课程中心-收藏课程", | |
186 | 221 | "businessId": "1", |
187 | 222 | "triggerTypes": [ |
188 | 223 | { |
189 | 224 | "triggerKey": "like_num", # 次数(循环类型)全局 |
190 | - "value": 2 | |
225 | + "value": 2, | |
226 | + "remark": "课程中心-收藏课程" | |
191 | 227 | } |
192 | 228 | ] |
193 | 229 | } |
... | ... | @@ -203,16 +239,17 @@ class CourseCenter(ATDDCase): |
203 | 239 | "memUid": self.jipeihong_uid, |
204 | 240 | "businessKey": self.businessKey, |
205 | 241 | "businessAct": "comment", |
206 | - "remark": "课程中心-评论课程", | |
207 | 242 | "businessId": "1", |
208 | 243 | "triggerTypes": [ |
209 | 244 | { |
210 | 245 | "triggerKey": "comment_num", # 次数(循环类型)全局 |
211 | - "value": 2 | |
246 | + "value": 2, | |
247 | + "remark": "课程中心-评论课程" | |
212 | 248 | }, |
213 | 249 | { |
214 | 250 | "triggerKey": "comment_business_num", # 门数(循环类型)全局 |
215 | - "value": 2 | |
251 | + "value": 2, | |
252 | + "remark": "课程中心-评论课程" | |
216 | 253 | } |
217 | 254 | ] |
218 | 255 | } |
... | ... | @@ -222,50 +259,23 @@ class CourseCenter(ATDDCase): |
222 | 259 | self.assertEquals(code, 'SUCCESS') |
223 | 260 | print(result.json()) |
224 | 261 | |
225 | - | |
226 | - # 课程中心-单课程学习 | |
227 | - def test_one_learning(self): | |
228 | - data = { | |
229 | - "memUid": self.jipeihong_uid, | |
230 | - "businessKey": self.businessKey, | |
231 | - "businessAct": "one_learning", | |
232 | - "remark": "课程中心-单课程学习", | |
233 | - "businessId": "1", | |
234 | - "triggerTypes": [ | |
235 | - { | |
236 | - "triggerKey": "complete", # 完成(枚举类型)单个 | |
237 | - "value": 2 | |
238 | - }, | |
239 | - { | |
240 | - "triggerKey": "number", # 完成单课程数(循环类型)全局 | |
241 | - "value": 2 | |
242 | - } | |
243 | - ] | |
244 | - } | |
245 | - result = self.post(self.url, json.dumps(data), headers=self.header_json) | |
246 | - code = result.json()['code'] | |
247 | - self.assertNotEquals(code, 'INTEGRAL_RULE_NDAYOT_OPEN') # 积分策略没有启用 | |
248 | - self.assertEquals(code, 'SUCCESS') | |
249 | - print(result.json()) | |
250 | - | |
251 | - | |
252 | 262 | # 课程中心-分享课程 |
253 | 263 | def test_shared(self): |
254 | 264 | data = { |
255 | 265 | "memUid": self.jipeihong_uid, |
256 | 266 | "businessKey": self.businessKey, |
257 | 267 | "businessAct": "shared", |
258 | - "remark": "课程中心-分享课程", | |
259 | 268 | "businessId": "1", |
260 | 269 | "triggerTypes": [ |
261 | 270 | { |
262 | 271 | "triggerKey": "shared_num", # 次数(循环类型)全局 |
263 | - "value": 2 | |
272 | + "value": 1, | |
273 | + "remark": "课程中心-分享课程" | |
264 | 274 | } |
265 | 275 | ] |
266 | 276 | } |
267 | 277 | result = self.post(self.url, json.dumps(data), headers=self.header_json) |
268 | 278 | code = result.json()['code'] |
269 | - self.assertNotEquals(code, 'INTEGRAL_RULE_NDAYOT_OPEN') # 积分策略没有启用 | |
279 | + # self.assertNotEquals(code, 'INTEGRAL_RULE_NDAYOT_OPEN') # 积分策略没有启用 | |
270 | 280 | self.assertEquals(code, 'SUCCESS') |
271 | 281 | print(result.json()) |
272 | 282 | \ No newline at end of file | ... | ... |
tests/Integral/UC_xuefen/test_default_update.py
0 → 100644
1 | +from atdd.ATDDCase import ATDDCase | |
2 | +from tests.Integral.publicMethods import PCpublicMethods | |
3 | + | |
4 | + | |
5 | +# 修改默认积分策略——课程中心 | |
6 | +class DefaultUpdate(ATDDCase): | |
7 | + url = ATDDCase().host + '/' + ATDDCase().domain + "/Integral/Apicp/Integral/UpdateDefaultList" | |
8 | + businessKey = "course_center" | |
9 | + triggerKeyDict = PCpublicMethods.PCpublicMethods().getTriggerKey(businessKey) | |
10 | + triggerValueDict = PCpublicMethods.PCpublicMethods().getTriggerValue(businessKey) | |
11 | + | |
12 | + def setUp(self): | |
13 | + pass | |
14 | + | |
15 | + # 分享课程 | |
16 | + def test_update_shared(self): | |
17 | + header_json = {"Content-Type": "application/json; charset=utf-8"} | |
18 | + data = { | |
19 | + "miType": "mi_type1", | |
20 | + "enable": 1, # 启用 | |
21 | + "businessKey": self.businessKey, | |
22 | + "businessName": "课程中心", | |
23 | + "businessAct": "shared", | |
24 | + "businessActName": "分享课程", | |
25 | + "triggers": [ | |
26 | + { | |
27 | + "triggerKey": "shared_num", | |
28 | + "triggerName": "次数", | |
29 | + "unit": "次", | |
30 | + "computeType": 1, | |
31 | + "enabled": True, | |
32 | + "triggerValue": [ | |
33 | + { | |
34 | + "condition": "1", | |
35 | + "score": self.triggerValueDict['shared-shared_num'][0]['condition'] | |
36 | + } | |
37 | + ] | |
38 | + } | |
39 | + ] | |
40 | + } | |
41 | + result = self.post(self.url, json=data, headers=header_json) | |
42 | + print(self.url) | |
43 | + print(result.json()) | |
44 | + | |
45 | + # 单课程学习 | |
46 | + def test_update_one_learning(self): | |
47 | + header_json = {"Content-Type": "application/json; charset=utf-8"} | |
48 | + data = { | |
49 | + "miType": "mi_type1", | |
50 | + "enable": 1, # 启用 | |
51 | + "businessKey": self.businessKey, | |
52 | + "businessName": "课程中心", | |
53 | + "businessAct": "one_learning", | |
54 | + "businessActName": "单课程学习", | |
55 | + "triggers": [ | |
56 | + { | |
57 | + "triggerKey": "complete", | |
58 | + "triggerName": "完成", | |
59 | + "unit": "次", | |
60 | + "computeType": 2, | |
61 | + "enabled": True, | |
62 | + "applicableScope": 2, | |
63 | + "triggerValue": [ | |
64 | + { | |
65 | + "condition": "1", | |
66 | + "score": 5 | |
67 | + } | |
68 | + ] | |
69 | + }, | |
70 | + { | |
71 | + "triggerKey": "number", | |
72 | + "triggerName": "完成单课程数", | |
73 | + "unit": "门", | |
74 | + "computeType": 1, | |
75 | + "enabled": True, | |
76 | + "triggerValue": [ | |
77 | + { | |
78 | + "condition": "5", | |
79 | + "score": 30 | |
80 | + } | |
81 | + ] | |
82 | + } | |
83 | + ] | |
84 | + | |
85 | + } | |
86 | + result = self.post(self.url, json=data, headers=header_json) | |
87 | + print(self.url) | |
88 | + print(result.json()) | |
89 | + | |
90 | + # 单课程测评 | |
91 | + def test_update_one_evaluation(self): | |
92 | + header_json = {"Content-Type": "application/json; charset=utf-8"} | |
93 | + data = { | |
94 | + "miType": "mi_type1", | |
95 | + "enable": 1, # 启用 | |
96 | + "businessKey": self.businessKey, | |
97 | + "businessName": "课程中心", | |
98 | + "businessAct": "one_evaluation", | |
99 | + "businessActName": "单课程测评", | |
100 | + "triggers": [ | |
101 | + { | |
102 | + "triggerKey": "pass", | |
103 | + "triggerName": "通过", | |
104 | + "unit": "次", | |
105 | + "computeType": 2, | |
106 | + "enabled": True, | |
107 | + "applicableScope": 2, | |
108 | + "triggerValue": [ | |
109 | + { | |
110 | + "condition": "1", | |
111 | + "score": 10 | |
112 | + } | |
113 | + ] | |
114 | + }, | |
115 | + { | |
116 | + "triggerKey": "number", | |
117 | + "triggerName": "通过题数百分比", | |
118 | + "unit": "%", | |
119 | + "computeType": 4, | |
120 | + "enabled": True, | |
121 | + "triggerValue": [ | |
122 | + { | |
123 | + "condition": "60", | |
124 | + "score": 2 | |
125 | + }, | |
126 | + { | |
127 | + "condition": "80", | |
128 | + "score": 5 | |
129 | + }, | |
130 | + { | |
131 | + "condition": "100", | |
132 | + "score": 10 | |
133 | + } | |
134 | + ] | |
135 | + }, | |
136 | + { | |
137 | + "triggerKey": "pass_number", | |
138 | + "triggerName": "通过单课程数", | |
139 | + "unit": "门", | |
140 | + "computeType": 1, | |
141 | + "enabled": True, | |
142 | + "triggerValue": [ | |
143 | + { | |
144 | + "condition": "5", | |
145 | + "score": 60 | |
146 | + } | |
147 | + ] | |
148 | + } | |
149 | + ] | |
150 | + } | |
151 | + result = self.post(self.url, json=data, headers=header_json) | |
152 | + print(self.url) | |
153 | + print(result.json()) | |
0 | 154 | \ No newline at end of file | ... | ... |
tests/Integral/UC_xuefen/test_integralIndexList.py
... | ... | @@ -8,12 +8,12 @@ class IntegralIndexList(ATDDCase): |
8 | 8 | pass |
9 | 9 | |
10 | 10 | def test_integralIndexList(self): |
11 | - app = "integral" | |
11 | + app = "yuanquan" | |
12 | 12 | header_json = {"Content-Type": "application/json; charset=utf-8"} |
13 | 13 | url = self.uc_host + "/a/" + self.domain + "/" + app + "/qy/integral/integralIndexList" |
14 | 14 | data = { |
15 | 15 | "memUid": self.jipeihong_uid, |
16 | - "miType": "mi_type1" | |
16 | + "miType": "mi_type0" | |
17 | 17 | } |
18 | 18 | result = self.post(url, json=data, headers=header_json) |
19 | 19 | print(url) | ... | ... |
tests/Integral/UC_xuefen/test_member_list.py
... | ... | @@ -12,7 +12,7 @@ class MemberList(ATDDCase): |
12 | 12 | header_json = {"Content-Type": "application/json; charset=utf-8"} |
13 | 13 | url = self.uc_host + "/a/" + self.domain + "/" + app + "/qy/integral/member-list" |
14 | 14 | data = { |
15 | - "pageNum": 2, | |
15 | + "pageNum": 1, | |
16 | 16 | "miType": "mi_type1" |
17 | 17 | } |
18 | 18 | result = self.post(url, json=data, headers=header_json) | ... | ... |
tests/Integral/UC_xuefen/test_update.py
... | ... | @@ -9,17 +9,17 @@ class Update(ATDDCase): |
9 | 9 | |
10 | 10 | # 增加积分 |
11 | 11 | def test_update_add(self): |
12 | - app = "yuanquan" | |
13 | 12 | header_json = {"Content-Type": "application/json; charset=utf-8"} |
14 | - url = self.uc_host + "/a/" + self.domain + "/" + app + "/qy/integral/update" | |
13 | + url = self.uc_host + "/a/" + self.domain + "/" + self.app + "/qy/integral/update" | |
15 | 14 | data = { |
16 | 15 | "milOptType": 2, |
17 | 16 | "miType": "mi_type1", |
18 | - "integral": 100, | |
17 | + "integral": 1, | |
19 | 18 | "uids": self.jipeihong_uid, |
20 | 19 | "remark": "测试", |
21 | 20 | "milCreateMemUsername": "季培红", |
22 | - "milCreateMemUid": self.jipeihong_uid | |
21 | + "milCreateMemUid": self.jipeihong_uid, | |
22 | + "msgIdentifier": self.app | |
23 | 23 | } |
24 | 24 | result = self.post(url, json=data, headers=header_json) |
25 | 25 | print(url) |
... | ... | @@ -27,17 +27,17 @@ class Update(ATDDCase): |
27 | 27 | |
28 | 28 | # 扣减积分 |
29 | 29 | def test_update_detection(self): |
30 | - app = "yuanquan" | |
31 | 30 | header_json = {"Content-Type": "application/json; charset=utf-8"} |
32 | - url = self.uc_host + "/a/" + self.domain + "/" + app + "/qy/integral/update" | |
31 | + url = self.uc_host + "/a/" + self.domain + "/" + self.app + "/qy/integral/update" | |
33 | 32 | data = { |
34 | 33 | "milOptType": 3, |
35 | 34 | "miType": "mi_type0", |
36 | - "integral": 22, | |
35 | + "integral": 99999, | |
37 | 36 | "uids": self.jipeihong_uid, |
38 | 37 | "remark": "测试", |
39 | 38 | "milCreateMemUsername": "季培红", |
40 | - "milCreateMemUid": self.jipeihong_uid | |
39 | + "milCreateMemUid": self.jipeihong_uid, | |
40 | + "msgIdentifier": self.app | |
41 | 41 | } |
42 | 42 | result = self.post(url, json=data, headers=header_json) |
43 | 43 | print(url) | ... | ... |
tests/Integral/publicMethods/PCpublicMethods.py
... | ... | @@ -126,7 +126,7 @@ class PCpublicMethods(PcPost): |
126 | 126 | |
127 | 127 | # 积分策略:获取业务应用的触发行为的value,并构造成字典 |
128 | 128 | # 参数:businessKey |
129 | - def getTriggerValue(self,businessKey): | |
129 | + def getTriggerValue(self, businessKey): | |
130 | 130 | |
131 | 131 | self.do_login(self.host, self.mobile, self.psw, self.domain) |
132 | 132 | interfaceUrl = "/Integral/Apicp/Integral/DefaultList" | ... | ... |