Commit f2b0f333ad3eca0e86fc71d106510c96f2a2b807

Authored by yangfan
1 parent 0aa01eca

商家服务数据清理

@@ -5,383 +5,6 @@ import json @@ -5,383 +5,6 @@ import json
5 reload(sys) 5 reload(sys)
6 sys.setdefaultencoding('utf8') 6 sys.setdefaultencoding('utf8')
7 7
8 -  
9 -def get_data(name, phone, map_address, longPoint, latPoint, filePath, imagePath):  
10 - m = MultipartEncoder(  
11 - fields={  
12 - 'name': name,  
13 - 'phone': phone,  
14 - 'map_address': map_address,  
15 - 'long': longPoint,  
16 - 'lat': latPoint,  
17 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
18 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
19 - }  
20 - )  
21 - return m  
22 -  
23 -  
24 -def get_data_noname(phone, map_address, longPoint, latPoint, filePath, imagePath):  
25 - m = MultipartEncoder(  
26 - fields={  
27 - 'phone': phone,  
28 - 'map_address': map_address,  
29 - 'long': longPoint,  
30 - 'lat': latPoint,  
31 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
32 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
33 - }  
34 - )  
35 - return m  
36 -  
37 -  
38 -def get_data_nophone(name, map_address, longPoint, latPoint, filePath, imagePath):  
39 - m = MultipartEncoder(  
40 - fields={  
41 - 'name': name,  
42 - 'map_address': map_address,  
43 - 'long': longPoint,  
44 - 'lat': latPoint,  
45 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
46 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
47 - }  
48 - )  
49 - return m  
50 -  
51 -  
52 -def get_data_nomapaddress(name, phone, longPoint, latPoint, filePath, imagePath):  
53 - m = MultipartEncoder(  
54 - fields={  
55 - 'name': name,  
56 - 'phone': phone,  
57 - 'long': longPoint,  
58 - 'lat': latPoint,  
59 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
60 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
61 - }  
62 - )  
63 - return m  
64 -  
65 -  
66 -def get_data_nofile(name, phone, map_address, longPoint, latPoint, imagePath):  
67 - m = MultipartEncoder(  
68 - fields={  
69 - 'name': name,  
70 - 'phone': phone,  
71 - 'map_address': map_address,  
72 - 'long': longPoint,  
73 - 'lat': latPoint,  
74 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
75 - }  
76 - )  
77 - return m  
78 -  
79 -  
80 -def get_data_noimage(name, phone, map_address, longPoint, latPoint, filePath):  
81 - m = MultipartEncoder(  
82 - fields={  
83 - 'name': name,  
84 - 'phone': phone,  
85 - 'map_address': map_address,  
86 - 'long': longPoint,  
87 - 'lat': latPoint,  
88 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg')  
89 - }  
90 - )  
91 - return m  
92 -  
93 -  
94 -def get_data_nolong(name, phone, map_address, latPoint, filePath, imagePath):  
95 - m = MultipartEncoder(  
96 - fields={  
97 - 'name': name,  
98 - 'phone': phone,  
99 - 'map_address': map_address,  
100 - 'lat': latPoint,  
101 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
102 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
103 - }  
104 - )  
105 - return m  
106 -  
107 -  
108 -def get_data_nolat(name, phone, map_address, longPoint, filePath, imagePath):  
109 - m = MultipartEncoder(  
110 - fields={  
111 - 'name': name,  
112 - 'phone': phone,  
113 - 'map_address': map_address,  
114 - 'long': longPoint,  
115 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
116 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
117 - }  
118 - )  
119 - return m  
120 -  
121 -  
122 -def get_content_type(data):  
123 - return data.content_type  
124 -  
125 -  
126 -def set_data(sellerid, name, phone, map_address, longPoint, latPoint, filePath, imagePath):  
127 - m = MultipartEncoder(  
128 - fields={  
129 - 'id': sellerid,  
130 - 'name': name,  
131 - 'phone': phone,  
132 - 'map_address': map_address,  
133 - 'long': longPoint,  
134 - 'lat': latPoint,  
135 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
136 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
137 - }  
138 - )  
139 - return m  
140 -  
141 -  
142 -def set_data_noid(name, phone, map_address, longPoint, latPoint, filePath, imagePath):  
143 - m = MultipartEncoder(  
144 - fields={  
145 - 'name': name,  
146 - 'phone': phone,  
147 - 'map_address': map_address,  
148 - 'long': longPoint,  
149 - 'lat': latPoint,  
150 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
151 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
152 - }  
153 - )  
154 - return m  
155 -  
156 -  
157 -def set_data_noname(sellerid, phone, map_address, longPoint, latPoint, filePath, imagePath):  
158 - m = MultipartEncoder(  
159 - fields={  
160 - 'id': sellerid,  
161 - 'phone': phone,  
162 - 'map_address': map_address,  
163 - 'long': longPoint,  
164 - 'lat': latPoint,  
165 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
166 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
167 - }  
168 - )  
169 - return m  
170 -  
171 -  
172 -def set_data_nophone(sellerid, name, map_address, longPoint, latPoint, filePath, imagePath):  
173 - m = MultipartEncoder(  
174 - fields={  
175 - 'id': sellerid,  
176 - 'name': name,  
177 - 'map_address': map_address,  
178 - 'long': longPoint,  
179 - 'lat': latPoint,  
180 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
181 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
182 - }  
183 - )  
184 - return m  
185 -  
186 -  
187 -def set_data_nomapaddress(sellerid, name, phone, longPoint, latPoint, filePath, imagePath):  
188 - m = MultipartEncoder(  
189 - fields={  
190 - 'id': sellerid,  
191 - 'name': name,  
192 - 'phone': phone,  
193 - 'long': longPoint,  
194 - 'lat': latPoint,  
195 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
196 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
197 - }  
198 - )  
199 - return m  
200 -  
201 -  
202 -def set_data_nolong(sellerid, name, phone, map_address, latPoint, filePath, imagePath):  
203 - m = MultipartEncoder(  
204 - fields={  
205 - 'id': sellerid,  
206 - 'name': name,  
207 - 'phone': phone,  
208 - 'map_address': map_address,  
209 - 'lat': latPoint,  
210 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
211 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
212 - }  
213 - )  
214 - return m  
215 -  
216 -  
217 -def set_data_nolat(sellerid, name, phone, map_address, longPoint, filePath, imagePath):  
218 - m = MultipartEncoder(  
219 - fields={  
220 - 'id': sellerid,  
221 - 'name': name,  
222 - 'phone': phone,  
223 - 'map_address': map_address,  
224 - 'long': longPoint,  
225 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg'),  
226 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
227 - }  
228 - )  
229 - return m  
230 -  
231 -  
232 -def set_data_nofile(sellerid, name, phone, map_address, longPoint, latPoint, imagePath):  
233 - m = MultipartEncoder(  
234 - fields={  
235 - 'id': sellerid,  
236 - 'name': name,  
237 - 'phone': phone,  
238 - 'map_address': map_address,  
239 - 'long': longPoint,  
240 - 'lat': latPoint,  
241 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
242 - }  
243 - )  
244 - return m  
245 -  
246 -  
247 -def set_data_noimage(sellerid, name, phone, map_address, longPoint, latPoint, filePath):  
248 - m = MultipartEncoder(  
249 - fields={  
250 - 'id': sellerid,  
251 - 'name': name,  
252 - 'phone': phone,  
253 - 'map_address': map_address,  
254 - 'long': longPoint,  
255 - 'lat': latPoint,  
256 - 'file': ('file', open(filePath, 'rb'), 'image/jpeg')  
257 - }  
258 - )  
259 - return m  
260 -  
261 -  
262 -def get_menu(name, sellerid, status, imagePath):  
263 - m = MultipartEncoder(  
264 - fields={  
265 - 'name': name,  
266 - 'sellerid': sellerid,  
267 - 'status': status,  
268 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
269 - }  
270 - )  
271 - return m  
272 -  
273 -  
274 -def get_menu_noname(sellerid, status, imagePath):  
275 - m = MultipartEncoder(  
276 - fields={  
277 - 'sellerid': sellerid,  
278 - 'status': status,  
279 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
280 - }  
281 - )  
282 - return m  
283 -  
284 -  
285 -def get_menu_noid(name, status, imagePath):  
286 - m = MultipartEncoder(  
287 - fields={  
288 - 'name': name,  
289 - 'status': status,  
290 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
291 - }  
292 - )  
293 - return m  
294 -  
295 -  
296 -def get_menu_nostatus(name, sellerid, imagePath):  
297 - m = MultipartEncoder(  
298 - fields={  
299 - 'name': name,  
300 - 'sellerid': sellerid,  
301 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
302 - }  
303 - )  
304 - return m  
305 -  
306 -  
307 -def get_menu_noimage(name, sellerid, status):  
308 - m = MultipartEncoder(  
309 - fields={  
310 - 'name': name,  
311 - 'sellerid': sellerid,  
312 - 'status': status  
313 - }  
314 - )  
315 - return m  
316 -  
317 -  
318 -def set_menu(menuid, name, status, imagePath):  
319 - m = MultipartEncoder(  
320 - fields={  
321 - 'id': menuid,  
322 - 'name': name,  
323 - 'status': status,  
324 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
325 - }  
326 - )  
327 - return m  
328 -  
329 -  
330 -def set_menu_noid(name, status, imagePath):  
331 - m = MultipartEncoder(  
332 - fields={  
333 - 'name': name,  
334 - 'status': status,  
335 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
336 - }  
337 - )  
338 - return m  
339 -  
340 -  
341 -def set_menu_noname(menuid, status, imagePath):  
342 - m = MultipartEncoder(  
343 - fields={  
344 - 'id': menuid,  
345 - 'status': status,  
346 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
347 - }  
348 - )  
349 - return m  
350 -  
351 -  
352 -def set_menu_nostatus(menuid, name, imagePath):  
353 - m = MultipartEncoder(  
354 - fields={  
355 - 'id': menuid,  
356 - 'name': name,  
357 - 'image': ('image', open(imagePath, 'rb'), 'image/jpeg')  
358 - }  
359 - )  
360 - return m  
361 -  
362 -  
363 -def set_menu_noimage(menuid, name, status):  
364 - m = MultipartEncoder(  
365 - fields={  
366 - 'id': menuid,  
367 - 'name': name,  
368 - 'status': status  
369 - }  
370 - )  
371 - return m  
372 -  
373 -  
374 -def get_cook(**args):  
375 - fields = {}  
376 - for key in args:  
377 - if key == "image":  
378 - fields[key] = ("image", open(bytes(args[key]), "rb"), "image/jpeg")  
379 - else:  
380 - fields[key] = bytes(args[key])  
381 - m = MultipartEncoder(fields)  
382 - return m  
383 -  
384 -  
385 def get_data(**args): 8 def get_data(**args):
386 fields = {} 9 fields = {}
387 for key in args: 10 for key in args:
@@ -391,3 +14,7 @@ def get_data(**args): @@ -391,3 +14,7 @@ def get_data(**args):
391 fields[key] = bytes(args[key]) 14 fields[key] = bytes(args[key])
392 m = MultipartEncoder(fields) 15 m = MultipartEncoder(fields)
393 return m 16 return m
  17 +
  18 +
  19 +def get_content_type(data):
  20 + return data.content_type
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <title>Test Result</title>
  5 + <meta charset="utf-8">
  6 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7 + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  8 +</head>
  9 +<body>
  10 + <div class="container">
  11 + <div class="row">
  12 + <div class="col-xs-12">
  13 + <h2 class="text-capitalize">Test Result</h2>
  14 + <p class='attribute'><strong>Start Time: </strong>2018-02-05 18:05:43</p>
  15 + <p class='attribute'><strong>Duration: </strong>8.259s</p>
  16 + <p class='attribute'><strong>Status: </strong>Pass: 26</p>
  17 + </div>
  18 + </div>
  19 + <div class="row">
  20 + <div class="col-xs-12 col-sm-10 col-md-10">
  21 + <table class='table table-hover table-responsive'>
  22 + <thead>
  23 + <tr>
  24 + <th>商家服务singleAPI</th>
  25 + <th>Status</th>
  26 + </tr>
  27 + </thead>
  28 + <tbody>
  29 +
  30 + <tr class='success'>
  31 + <td class="col-xs-9">添加商家信息(正确操作)</td>
  32 + <td class="col-xs-3">
  33 + <span class="label label-success">
  34 +
  35 + Pass
  36 +
  37 + </span>
  38 +
  39 + </td>
  40 + </tr>
  41 +
  42 +
  43 + <tr class='success'>
  44 + <td class="col-xs-9">添加商家信息(不填name)</td>
  45 + <td class="col-xs-3">
  46 + <span class="label label-success">
  47 +
  48 + Pass
  49 +
  50 + </span>
  51 +
  52 + </td>
  53 + </tr>
  54 +
  55 +
  56 + <tr class='success'>
  57 + <td class="col-xs-9">添加商家信息(不填phone)</td>
  58 + <td class="col-xs-3">
  59 + <span class="label label-success">
  60 +
  61 + Pass
  62 +
  63 + </span>
  64 +
  65 + </td>
  66 + </tr>
  67 +
  68 +
  69 + <tr class='success'>
  70 + <td class="col-xs-9">添加商家信息(不填map_address)</td>
  71 + <td class="col-xs-3">
  72 + <span class="label label-success">
  73 +
  74 + Pass
  75 +
  76 + </span>
  77 +
  78 + </td>
  79 + </tr>
  80 +
  81 +
  82 + <tr class='success'>
  83 + <td class="col-xs-9">添加商家信息(不填file)</td>
  84 + <td class="col-xs-3">
  85 + <span class="label label-success">
  86 +
  87 + Pass
  88 +
  89 + </span>
  90 +
  91 + </td>
  92 + </tr>
  93 +
  94 +
  95 + <tr class='success'>
  96 + <td class="col-xs-9">添加商家信息(不填image)</td>
  97 + <td class="col-xs-3">
  98 + <span class="label label-success">
  99 +
  100 + Pass
  101 +
  102 + </span>
  103 +
  104 + </td>
  105 + </tr>
  106 +
  107 +
  108 + <tr class='success'>
  109 + <td class="col-xs-9">添加商家信息(不填long)</td>
  110 + <td class="col-xs-3">
  111 + <span class="label label-success">
  112 +
  113 + Pass
  114 +
  115 + </span>
  116 +
  117 + </td>
  118 + </tr>
  119 +
  120 +
  121 + <tr class='success'>
  122 + <td class="col-xs-9">添加商家信息(不填lat)</td>
  123 + <td class="col-xs-3">
  124 + <span class="label label-success">
  125 +
  126 + Pass
  127 +
  128 + </span>
  129 +
  130 + </td>
  131 + </tr>
  132 +
  133 +
  134 + <tr class='success'>
  135 + <td class="col-xs-9">添加商家信息(重复name)</td>
  136 + <td class="col-xs-3">
  137 + <span class="label label-success">
  138 +
  139 + Pass
  140 +
  141 + </span>
  142 +
  143 + </td>
  144 + </tr>
  145 +
  146 +
  147 + <tr class='success'>
  148 + <td class="col-xs-9">添加商家信息(重复phone)</td>
  149 + <td class="col-xs-3">
  150 + <span class="label label-success">
  151 +
  152 + Pass
  153 +
  154 + </span>
  155 +
  156 + </td>
  157 + </tr>
  158 +
  159 +
  160 + <tr class='success'>
  161 + <td class="col-xs-9">获取商家列表数据(查询第一页)</td>
  162 + <td class="col-xs-3">
  163 + <span class="label label-success">
  164 +
  165 + Pass
  166 +
  167 + </span>
  168 +
  169 + </td>
  170 + </tr>
  171 +
  172 +
  173 + <tr class='success'>
  174 + <td class="col-xs-9">获取商家列表数据(查询不存在的页码)</td>
  175 + <td class="col-xs-3">
  176 + <span class="label label-success">
  177 +
  178 + Pass
  179 +
  180 + </span>
  181 +
  182 + </td>
  183 + </tr>
  184 +
  185 +
  186 + <tr class='success'>
  187 + <td class="col-xs-9">根据商家ID获取商家信息(sellerid=5)</td>
  188 + <td class="col-xs-3">
  189 + <span class="label label-success">
  190 +
  191 + Pass
  192 +
  193 + </span>
  194 +
  195 + </td>
  196 + </tr>
  197 +
  198 +
  199 + <tr class='success'>
  200 + <td class="col-xs-9">根据商家ID获取商家信息(sellerid不存在)</td>
  201 + <td class="col-xs-3">
  202 + <span class="label label-success">
  203 +
  204 + Pass
  205 +
  206 + </span>
  207 +
  208 + </td>
  209 + </tr>
  210 +
  211 +
  212 + <tr class='success'>
  213 + <td class="col-xs-9">根据商家ID修改商家信息(正确操作)</td>
  214 + <td class="col-xs-3">
  215 + <span class="label label-success">
  216 +
  217 + Pass
  218 +
  219 + </span>
  220 +
  221 + </td>
  222 + </tr>
  223 +
  224 +
  225 + <tr class='success'>
  226 + <td class="col-xs-9">根据商家ID修改商家信息(不填id)</td>
  227 + <td class="col-xs-3">
  228 + <span class="label label-success">
  229 +
  230 + Pass
  231 +
  232 + </span>
  233 +
  234 + </td>
  235 + </tr>
  236 +
  237 +
  238 + <tr class='success'>
  239 + <td class="col-xs-9">根据商家ID修改商家信息(不填name)</td>
  240 + <td class="col-xs-3">
  241 + <span class="label label-success">
  242 +
  243 + Pass
  244 +
  245 + </span>
  246 +
  247 + </td>
  248 + </tr>
  249 +
  250 +
  251 + <tr class='success'>
  252 + <td class="col-xs-9">根据商家ID修改商家信息(不填phone)</td>
  253 + <td class="col-xs-3">
  254 + <span class="label label-success">
  255 +
  256 + Pass
  257 +
  258 + </span>
  259 +
  260 + </td>
  261 + </tr>
  262 +
  263 +
  264 + <tr class='success'>
  265 + <td class="col-xs-9">根据商家ID修改商家信息(不填map_address)</td>
  266 + <td class="col-xs-3">
  267 + <span class="label label-success">
  268 +
  269 + Pass
  270 +
  271 + </span>
  272 +
  273 + </td>
  274 + </tr>
  275 +
  276 +
  277 + <tr class='success'>
  278 + <td class="col-xs-9">根据商家ID修改商家信息(不填long)</td>
  279 + <td class="col-xs-3">
  280 + <span class="label label-success">
  281 +
  282 + Pass
  283 +
  284 + </span>
  285 +
  286 + </td>
  287 + </tr>
  288 +
  289 +
  290 + <tr class='success'>
  291 + <td class="col-xs-9">根据商家ID修改商家信息(不填lat)</td>
  292 + <td class="col-xs-3">
  293 + <span class="label label-success">
  294 +
  295 + Pass
  296 +
  297 + </span>
  298 +
  299 + </td>
  300 + </tr>
  301 +
  302 +
  303 + <tr class='success'>
  304 + <td class="col-xs-9">根据商家ID修改商家信息(不填file)</td>
  305 + <td class="col-xs-3">
  306 + <span class="label label-success">
  307 +
  308 + Pass
  309 +
  310 + </span>
  311 +
  312 + </td>
  313 + </tr>
  314 +
  315 +
  316 + <tr class='success'>
  317 + <td class="col-xs-9">根据商家ID修改商家信息(不填image)</td>
  318 + <td class="col-xs-3">
  319 + <span class="label label-success">
  320 +
  321 + Pass
  322 +
  323 + </span>
  324 +
  325 + </td>
  326 + </tr>
  327 +
  328 +
  329 + <tr class='success'>
  330 + <td class="col-xs-9">根据商家ID修改商家信息(重复name)</td>
  331 + <td class="col-xs-3">
  332 + <span class="label label-success">
  333 +
  334 + Pass
  335 +
  336 + </span>
  337 +
  338 + </td>
  339 + </tr>
  340 +
  341 +
  342 + <tr class='success'>
  343 + <td class="col-xs-9">根据商家ID修改商家信息(重复phone)</td>
  344 + <td class="col-xs-3">
  345 + <span class="label label-success">
  346 +
  347 + Pass
  348 +
  349 + </span>
  350 +
  351 + </td>
  352 + </tr>
  353 +
  354 +
  355 + <tr class='success'>
  356 + <td class="col-xs-9">根据商家ID修改商家信息(不存在的商家)</td>
  357 + <td class="col-xs-3">
  358 + <span class="label label-success">
  359 +
  360 + Pass
  361 +
  362 + </span>
  363 +
  364 + </td>
  365 + </tr>
  366 +
  367 +
  368 + <tr>
  369 + <td>
  370 + Total Test Runned: 26
  371 + </td>
  372 + <td>
  373 + <span>Pass: 26</span>
  374 + </td>
  375 + </tr>
  376 + </tbody>
  377 + </table>
  378 + </div>
  379 + </div>
  380 + </div>
  381 + <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.min.js"></script>
  382 + <script type="text/javascript">
  383 + $(document).ready(function(){
  384 + $('td').on('click', '.btn', function(e){
  385 + e.preventDefault();
  386 + var $this = $(this);
  387 + var $nextRow = $this.closest('tr').next('tr');
  388 + $nextRow.slideToggle("fast");
  389 + $this.text(function(i, text){
  390 + if (text === 'View') {
  391 + return 'Hide';
  392 + } else {
  393 + return 'View';
  394 + };
  395 + });
  396 + });
  397 + });
  398 + </script>
  399 +</body>
  400 +</html>
@@ -2,18 +2,42 @@ @@ -2,18 +2,42 @@
2 name: "商家服务" 2 name: "商家服务"
3 request: 3 request:
4 base_url: http://dc1.colorcun.com:10005?s= 4 base_url: http://dc1.colorcun.com:10005?s=
  5 + variable_binds:
  6 + - add_name: "雁来客栈"
  7 + - add_phone: "13198765432"
  8 + - add_map_address: "陕西省西安市"
  9 + - add_long: "123"
  10 + - add_lat: "456"
  11 + - add_file: "/Users/orange/cover.jpeg"
  12 + - add_image: "/Users/orange/cover.jpeg"
  13 + - norepeat_name: "玲珑坊"
  14 + - norepeat_phone: "13123456789"
  15 + - pageNum: 1
  16 + - pageLarge: 10000
  17 + - sellerid_no: 10000
  18 + - update_id: "9"
  19 + - update_name: "呷哺修改1"
  20 + - update_phone: "18066666666"
  21 + - update_map_address: "陕西省西安市"
  22 + - update_long: "123"
  23 + - update_lat: "456"
  24 + - update_file: "/Users/orange/cover.jpeg"
  25 + - update_image: "/Users/orange/cover.jpeg"
  26 + - repeat_name: "测试商家"
  27 + - repeat_phone: "18049359987"
  28 + - sellerid_no_str: "10000"
5 29
6 #添加商家信息 30 #添加商家信息
7 - test: 31 - test:
8 name: 添加商家信息(正确操作) 32 name: 添加商家信息(正确操作)
9 variable_binds: 33 variable_binds:
10 - - name: "呷哺1"  
11 - - phone: "18011111111"  
12 - - map_address: "陕西省西安市"  
13 - - long: "123"  
14 - - lat: "456"  
15 - - file: "/Users/orange/cover.jpeg"  
16 - - image: "/Users/orange/cover.jpeg" 34 + - name: $add_name
  35 + - phone: $add_phone
  36 + - map_address: $add_map_address
  37 + - long: $add_long
  38 + - lat: $add_lat
  39 + - file: $add_file
  40 + - image: $add_image
17 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 41 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
18 request: 42 request:
19 url: App.Seller.AddSeller 43 url: App.Seller.AddSeller
@@ -21,18 +45,20 @@ @@ -21,18 +45,20 @@
21 headers: 45 headers:
22 Content-Type: ${get_content_type($multipart_encoder)} 46 Content-Type: ${get_content_type($multipart_encoder)}
23 data: $multipart_encoder 47 data: $multipart_encoder
  48 + extract:
  49 + - sellerid: content.data.sellerid
24 validate: 50 validate:
25 - eq: ["content.ret", 200] 51 - eq: ["content.ret", 200]
26 52
27 - test: 53 - test:
28 name: 添加商家信息(不填name) 54 name: 添加商家信息(不填name)
29 variable_binds: 55 variable_binds:
30 - - phone: "18011111111"  
31 - - map_address: "陕西省西安市"  
32 - - long: "123"  
33 - - lat: "456"  
34 - - file: "/Users/orange/cover.jpeg"  
35 - - image: "/Users/orange/cover.jpeg" 56 + - phone: $add_phone
  57 + - map_address: $add_map_address
  58 + - long: $add_long
  59 + - lat: $add_lat
  60 + - file: $add_file
  61 + - image: $add_image
36 - multipart_encoder: ${get_data(phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 62 - multipart_encoder: ${get_data(phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
37 request: 63 request:
38 url: App.Seller.AddSeller 64 url: App.Seller.AddSeller
@@ -47,12 +73,12 @@ @@ -47,12 +73,12 @@
47 - test: 73 - test:
48 name: 添加商家信息(不填phone) 74 name: 添加商家信息(不填phone)
49 variable_binds: 75 variable_binds:
50 - - name: "呷哺1"  
51 - - map_address: "陕西省西安市"  
52 - - long: "123"  
53 - - lat: "456"  
54 - - file: "/Users/orange/cover.jpeg"  
55 - - image: "/Users/orange/cover.jpeg" 76 + - name: $add_name
  77 + - map_address: $add_map_address
  78 + - long: $add_long
  79 + - lat: $add_lat
  80 + - file: $add_file
  81 + - image: $add_image
56 - multipart_encoder: ${get_data(name=$name,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 82 - multipart_encoder: ${get_data(name=$name,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
57 request: 83 request:
58 url: App.Seller.AddSeller 84 url: App.Seller.AddSeller
@@ -66,13 +92,12 @@ @@ -66,13 +92,12 @@
66 - test: 92 - test:
67 name: 添加商家信息(不填map_address) 93 name: 添加商家信息(不填map_address)
68 variable_binds: 94 variable_binds:
69 - - name: "呷哺1"  
70 - - phone: "18011111111"  
71 - - map_address: "陕西省西安市"  
72 - - long: "123"  
73 - - lat: "456"  
74 - - file: "/Users/orange/cover.jpeg"  
75 - - image: "/Users/orange/cover.jpeg" 95 + - name: $add_name
  96 + - phone: $add_phone
  97 + - long: $add_long
  98 + - lat: $add_lat
  99 + - file: $add_file
  100 + - image: $add_image
76 - multipart_encoder: ${get_data(name=$name,phone=$phone,long=$long,lat=$lat,file=$file,image=$image)} 101 - multipart_encoder: ${get_data(name=$name,phone=$phone,long=$long,lat=$lat,file=$file,image=$image)}
77 request: 102 request:
78 url: App.Seller.AddSeller 103 url: App.Seller.AddSeller
@@ -86,12 +111,12 @@ @@ -86,12 +111,12 @@
86 - test: 111 - test:
87 name: 添加商家信息(不填file) 112 name: 添加商家信息(不填file)
88 variable_binds: 113 variable_binds:
89 - - name: "呷哺1"  
90 - - phone: "18011111111"  
91 - - map_address: "陕西省西安市"  
92 - - long: "123"  
93 - - lat: "456"  
94 - - image: "/Users/orange/cover.jpeg" 114 + - name: $add_name
  115 + - phone: $add_phone
  116 + - map_address: $add_map_address
  117 + - long: $add_long
  118 + - lat: $add_lat
  119 + - image: $add_image
95 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,image=$image)} 120 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,image=$image)}
96 request: 121 request:
97 url: App.Seller.AddSeller 122 url: App.Seller.AddSeller
@@ -105,12 +130,12 @@ @@ -105,12 +130,12 @@
105 - test: 130 - test:
106 name: 添加商家信息(不填image) 131 name: 添加商家信息(不填image)
107 variable_binds: 132 variable_binds:
108 - - name: "呷哺1"  
109 - - phone: "18011111111"  
110 - - map_address: "陕西省西安市"  
111 - - long: "123"  
112 - - lat: "456"  
113 - - file: "/Users/orange/cover.jpeg" 133 + - name: $add_name
  134 + - phone: $add_phone
  135 + - map_address: $add_map_address
  136 + - long: $add_long
  137 + - lat: $add_lat
  138 + - file: $add_file
114 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file)} 139 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file)}
115 request: 140 request:
116 url: App.Seller.AddSeller 141 url: App.Seller.AddSeller
@@ -124,12 +149,12 @@ @@ -124,12 +149,12 @@
124 - test: 149 - test:
125 name: 添加商家信息(不填long) 150 name: 添加商家信息(不填long)
126 variable_binds: 151 variable_binds:
127 - - name: "呷哺1"  
128 - - phone: "18011111111"  
129 - - map_address: "陕西省西安市"  
130 - - lat: "456"  
131 - - file: "/Users/orange/cover.jpeg"  
132 - - image: "/Users/orange/cover.jpeg" 152 + - name: $add_name
  153 + - phone: $add_phone
  154 + - map_address: $add_map_address
  155 + - lat: $add_lat
  156 + - file: $add_file
  157 + - image: $add_image
133 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,lat=$lat,file=$file,image=$image)} 158 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,lat=$lat,file=$file,image=$image)}
134 request: 159 request:
135 url: App.Seller.AddSeller 160 url: App.Seller.AddSeller
@@ -143,12 +168,12 @@ @@ -143,12 +168,12 @@
143 - test: 168 - test:
144 name: 添加商家信息(不填lat) 169 name: 添加商家信息(不填lat)
145 variable_binds: 170 variable_binds:
146 - - name: "呷哺1"  
147 - - phone: "18011111111"  
148 - - map_address: "陕西省西安市"  
149 - - long: "123"  
150 - - file: "/Users/orange/cover.jpeg"  
151 - - image: "/Users/orange/cover.jpeg" 171 + - name: $add_name
  172 + - phone: $add_phone
  173 + - map_address: $add_map_address
  174 + - long: $add_long
  175 + - file: $add_file
  176 + - image: $add_image
152 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,file=$file,image=$image)} 177 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,file=$file,image=$image)}
153 request: 178 request:
154 url: App.Seller.AddSeller 179 url: App.Seller.AddSeller
@@ -162,13 +187,13 @@ @@ -162,13 +187,13 @@
162 - test: 187 - test:
163 name: 添加商家信息(重复name) 188 name: 添加商家信息(重复name)
164 variable_binds: 189 variable_binds:
165 - - name: "呷哺1"  
166 - - phone: "18011111112"  
167 - - map_address: "陕西省西安市"  
168 - - long: "123"  
169 - - lat: "456"  
170 - - file: "/Users/orange/cover.jpeg"  
171 - - image: "/Users/orange/cover.jpeg" 190 + - name: $add_name
  191 + - phone: $norepeat_phone
  192 + - map_address: $add_map_address
  193 + - long: $add_long
  194 + - lat: $add_lat
  195 + - file: $add_file
  196 + - image: $add_image
172 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 197 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
173 request: 198 request:
174 url: App.Seller.AddSeller 199 url: App.Seller.AddSeller
@@ -182,13 +207,13 @@ @@ -182,13 +207,13 @@
182 - test: 207 - test:
183 name: 添加商家信息(重复phone) 208 name: 添加商家信息(重复phone)
184 variable_binds: 209 variable_binds:
185 - - name: "呷哺2"  
186 - - phone: "18011111111"  
187 - - map_address: "陕西省西安市"  
188 - - long: "123"  
189 - - lat: "456"  
190 - - file: "/Users/orange/cover.jpeg"  
191 - - image: "/Users/orange/cover.jpeg" 210 + - name: $norepeat_name
  211 + - phone: $add_phone
  212 + - map_address: $add_map_address
  213 + - long: $add_long
  214 + - lat: $add_lat
  215 + - file: $add_file
  216 + - image: $add_image
192 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 217 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
193 request: 218 request:
194 url: App.Seller.AddSeller 219 url: App.Seller.AddSeller
@@ -207,7 +232,7 @@ @@ -207,7 +232,7 @@
207 url: App.Seller.SellerLists 232 url: App.Seller.SellerLists
208 method: POST 233 method: POST
209 data: 234 data:
210 - page: 1 235 + page: $pageNum
211 validate: 236 validate:
212 - eq: ["content.ret", 200] 237 - eq: ["content.ret", 200]
213 - test: 238 - test:
@@ -216,7 +241,7 @@ @@ -216,7 +241,7 @@
216 url: App.Seller.SellerLists 241 url: App.Seller.SellerLists
217 method: POST 242 method: POST
218 data: 243 data:
219 - page: 300 244 + page: $pageLarge
220 validate: 245 validate:
221 - eq: ["content.ret", 396] 246 - eq: ["content.ret", 396]
222 - eq: ["content.msg","非法请求:暂无商家"] 247 - eq: ["content.msg","非法请求:暂无商家"]
@@ -228,17 +253,17 @@ @@ -228,17 +253,17 @@
228 url: App.Seller.GetSellerById 253 url: App.Seller.GetSellerById
229 method: POST 254 method: POST
230 data: 255 data:
231 - sellerid: 5 256 + sellerid: $sellerid
232 validate: 257 validate:
233 - eq: ["content.ret", 200] 258 - eq: ["content.ret", 200]
234 - - eq: ["content.data.data.id", "5"] 259 + - eq: ["content.data.data.id", $sellerid]
235 - test: 260 - test:
236 name: 根据商家ID获取商家信息(sellerid不存在) 261 name: 根据商家ID获取商家信息(sellerid不存在)
237 request: 262 request:
238 url: App.Seller.GetSellerById 263 url: App.Seller.GetSellerById
239 method: POST 264 method: POST
240 data: 265 data:
241 - sellerid: 10000 266 + sellerid: $sellerid_no
242 validate: 267 validate:
243 - eq: ["content.ret", 396] 268 - eq: ["content.ret", 396]
244 - eq: ["content.msg","非法请求:暂无商家"] 269 - eq: ["content.msg","非法请求:暂无商家"]
@@ -247,14 +272,14 @@ @@ -247,14 +272,14 @@
247 - test: 272 - test:
248 name: 根据商家ID修改商家信息(正确操作) 273 name: 根据商家ID修改商家信息(正确操作)
249 variable_binds: 274 variable_binds:
250 - - id: "15"  
251 - - name: "呷哺修改1"  
252 - - phone: "18022222222"  
253 - - map_address: "陕西省西安市"  
254 - - long: "123"  
255 - - lat: "456"  
256 - - file: "/Users/orange/cover.jpeg"  
257 - - image: "/Users/orange/cover.jpeg" 275 + - id: $update_id
  276 + - name: $update_name
  277 + - phone: $update_phone
  278 + - map_address: $update_map_address
  279 + - long: $update_long
  280 + - lat: $update_lat
  281 + - file: $update_file
  282 + - image: $update_image
258 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 283 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
259 request: 284 request:
260 url: App.Seller.SetSellerById 285 url: App.Seller.SetSellerById
@@ -267,13 +292,13 @@ @@ -267,13 +292,13 @@
267 - test: 292 - test:
268 name: 根据商家ID修改商家信息(不填id) 293 name: 根据商家ID修改商家信息(不填id)
269 variable_binds: 294 variable_binds:
270 - - name: "呷哺修改1"  
271 - - phone: "18022222222"  
272 - - map_address: "陕西省西安市"  
273 - - long: "123"  
274 - - lat: "456"  
275 - - file: "/Users/orange/cover.jpeg"  
276 - - image: "/Users/orange/cover.jpeg" 295 + - name: $update_name
  296 + - phone: $update_phone
  297 + - map_address: $update_map_address
  298 + - long: $update_long
  299 + - lat: $update_lat
  300 + - file: $update_file
  301 + - image: $update_image
277 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 302 - multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
278 request: 303 request:
279 url: App.Seller.SetSellerById 304 url: App.Seller.SetSellerById
@@ -287,13 +312,13 @@ @@ -287,13 +312,13 @@
287 - test: 312 - test:
288 name: 根据商家ID修改商家信息(不填name) 313 name: 根据商家ID修改商家信息(不填name)
289 variable_binds: 314 variable_binds:
290 - - id: "15"  
291 - - phone: "18022222221"  
292 - - map_address: "陕西省西安市"  
293 - - long: "123"  
294 - - lat: "456"  
295 - - file: "/Users/orange/cover.jpeg"  
296 - - image: "/Users/orange/cover.jpeg" 315 + - id: $update_id
  316 + - phone: $update_phone
  317 + - map_address: $update_map_address
  318 + - long: $update_long
  319 + - lat: $update_lat
  320 + - file: $update_file
  321 + - image: $update_image
297 - multipart_encoder: ${get_data(id=$id,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 322 - multipart_encoder: ${get_data(id=$id,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
298 request: 323 request:
299 url: App.Seller.SetSellerById 324 url: App.Seller.SetSellerById
@@ -307,13 +332,13 @@ @@ -307,13 +332,13 @@
307 - test: 332 - test:
308 name: 根据商家ID修改商家信息(不填phone) 333 name: 根据商家ID修改商家信息(不填phone)
309 variable_binds: 334 variable_binds:
310 - - id: "15"  
311 - - name: "呷哺修改2"  
312 - - map_address: "陕西省西安市"  
313 - - long: "123"  
314 - - lat: "456"  
315 - - file: "/Users/orange/cover.jpeg"  
316 - - image: "/Users/orange/cover.jpeg" 335 + - id: $update_id
  336 + - name: $update_name
  337 + - map_address: $update_map_address
  338 + - long: $update_long
  339 + - lat: $update_lat
  340 + - file: $update_file
  341 + - image: $update_image
317 - multipart_encoder: ${get_data(id=$id,name=$name,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 342 - multipart_encoder: ${get_data(id=$id,name=$name,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
318 request: 343 request:
319 url: App.Seller.SetSellerById 344 url: App.Seller.SetSellerById
@@ -327,13 +352,13 @@ @@ -327,13 +352,13 @@
327 - test: 352 - test:
328 name: 根据商家ID修改商家信息(不填map_address) 353 name: 根据商家ID修改商家信息(不填map_address)
329 variable_binds: 354 variable_binds:
330 - - id: "15"  
331 - - name: "呷哺修改2"  
332 - - phone: "18022222221"  
333 - - long: "123"  
334 - - lat: "456"  
335 - - file: "/Users/orange/cover.jpeg"  
336 - - image: "/Users/orange/cover.jpeg" 355 + - id: $update_id
  356 + - name: $update_name
  357 + - phone: $update_phone
  358 + - long: $update_long
  359 + - lat: $update_lat
  360 + - file: $update_file
  361 + - image: $update_image
337 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,long=$long,lat=$lat,file=$file,image=$image)} 362 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,long=$long,lat=$lat,file=$file,image=$image)}
338 request: 363 request:
339 url: App.Seller.SetSellerById 364 url: App.Seller.SetSellerById
@@ -347,13 +372,13 @@ @@ -347,13 +372,13 @@
347 - test: 372 - test:
348 name: 根据商家ID修改商家信息(不填long) 373 name: 根据商家ID修改商家信息(不填long)
349 variable_binds: 374 variable_binds:
350 - - id: "15"  
351 - - name: "呷哺修改2"  
352 - - phone: "18022222221"  
353 - - map_address: "陕西省西安市"  
354 - - lat: "456"  
355 - - file: "/Users/orange/cover.jpeg"  
356 - - image: "/Users/orange/cover.jpeg" 375 + - id: $update_id
  376 + - name: $update_name
  377 + - phone: $update_phone
  378 + - map_address: $update_map_address
  379 + - lat: $update_lat
  380 + - file: $update_file
  381 + - image: $update_image
357 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,lat=$lat,file=$file,image=$image)} 382 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,lat=$lat,file=$file,image=$image)}
358 request: 383 request:
359 url: App.Seller.SetSellerById 384 url: App.Seller.SetSellerById
@@ -367,13 +392,13 @@ @@ -367,13 +392,13 @@
367 - test: 392 - test:
368 name: 根据商家ID修改商家信息(不填lat) 393 name: 根据商家ID修改商家信息(不填lat)
369 variable_binds: 394 variable_binds:
370 - - id: "15"  
371 - - name: "呷哺修改2"  
372 - - phone: "18022222221"  
373 - - map_address: "陕西省西安市"  
374 - - long: "123"  
375 - - file: "/Users/orange/cover.jpeg"  
376 - - image: "/Users/orange/cover.jpeg" 395 + - id: $update_id
  396 + - name: $update_name
  397 + - phone: $update_phone
  398 + - map_address: $update_map_address
  399 + - long: $update_long
  400 + - file: $update_file
  401 + - image: $update_image
377 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,file=$file,image=$image)} 402 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,file=$file,image=$image)}
378 request: 403 request:
379 url: App.Seller.SetSellerById 404 url: App.Seller.SetSellerById
@@ -387,13 +412,13 @@ @@ -387,13 +412,13 @@
387 - test: 412 - test:
388 name: 根据商家ID修改商家信息(不填file) 413 name: 根据商家ID修改商家信息(不填file)
389 variable_binds: 414 variable_binds:
390 - - id: "15"  
391 - - name: "呷哺修改2"  
392 - - phone: "18022222221"  
393 - - map_address: "陕西省西安市"  
394 - - long: "123"  
395 - - lat: "456"  
396 - - image: "/Users/orange/cover.jpeg" 415 + - id: $update_id
  416 + - name: $update_name
  417 + - phone: $update_phone
  418 + - map_address: $update_map_address
  419 + - long: $update_long
  420 + - lat: $update_lat
  421 + - image: $update_image
397 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,image=$image)} 422 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,image=$image)}
398 request: 423 request:
399 url: App.Seller.SetSellerById 424 url: App.Seller.SetSellerById
@@ -407,13 +432,13 @@ @@ -407,13 +432,13 @@
407 - test: 432 - test:
408 name: 根据商家ID修改商家信息(不填image) 433 name: 根据商家ID修改商家信息(不填image)
409 variable_binds: 434 variable_binds:
410 - - id: "15"  
411 - - name: "呷哺修改2"  
412 - - phone: "18022222221"  
413 - - map_address: "陕西省西安市"  
414 - - long: "123"  
415 - - lat: "456"  
416 - - file: "/Users/orange/cover.jpeg" 435 + - id: $update_id
  436 + - name: $update_name
  437 + - phone: $update_phone
  438 + - map_address: $update_map_address
  439 + - long: $update_long
  440 + - lat: $update_lat
  441 + - file: $update_file
417 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file)} 442 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file)}
418 request: 443 request:
419 url: App.Seller.SetSellerById 444 url: App.Seller.SetSellerById
@@ -427,14 +452,14 @@ @@ -427,14 +452,14 @@
427 - test: 452 - test:
428 name: 根据商家ID修改商家信息(重复name) 453 name: 根据商家ID修改商家信息(重复name)
429 variable_binds: 454 variable_binds:
430 - - id: "15"  
431 - - name: "呷哺修改1"  
432 - - phone: "18022222221"  
433 - - map_address: "陕西省西安市"  
434 - - long: "123"  
435 - - lat: "456"  
436 - - file: "/Users/orange/cover.jpeg"  
437 - - image: "/Users/orange/cover.jpeg" 455 + - id: $update_id
  456 + - name: $repeat_name
  457 + - phone: $update_phone
  458 + - map_address: $update_map_address
  459 + - long: $update_long
  460 + - lat: $update_lat
  461 + - file: $update_file
  462 + - image: $update_image
438 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 463 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
439 request: 464 request:
440 url: App.Seller.AddSeller 465 url: App.Seller.AddSeller
@@ -448,14 +473,14 @@ @@ -448,14 +473,14 @@
448 - test: 473 - test:
449 name: 根据商家ID修改商家信息(重复phone) 474 name: 根据商家ID修改商家信息(重复phone)
450 variable_binds: 475 variable_binds:
451 - - id: "15"  
452 - - name: "呷哺修改2"  
453 - - phone: "18022222222"  
454 - - map_address: "陕西省西安市"  
455 - - long: "123"  
456 - - lat: "456"  
457 - - file: "/Users/orange/cover.jpeg"  
458 - - image: "/Users/orange/cover.jpeg" 476 + - id: $update_id
  477 + - name: $norepeat_name
  478 + - phone: $repeat_phone
  479 + - map_address: $update_map_address
  480 + - long: $update_long
  481 + - lat: $update_lat
  482 + - file: $update_file
  483 + - image: $update_image
459 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 484 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
460 request: 485 request:
461 url: App.Seller.AddSeller 486 url: App.Seller.AddSeller
@@ -469,14 +494,14 @@ @@ -469,14 +494,14 @@
469 - test: 494 - test:
470 name: 根据商家ID修改商家信息(不存在的商家) 495 name: 根据商家ID修改商家信息(不存在的商家)
471 variable_binds: 496 variable_binds:
472 - - id: "500000"  
473 - - name: "测试店修改"  
474 - - phone: "1804342484"  
475 - - map_address: "陕西省西安市"  
476 - - long: "123"  
477 - - lat: "456"  
478 - - file: "/Users/orange/cover.jpeg"  
479 - - image: "/Users/orange/cover.jpeg" 497 + - id: $sellerid_no_str
  498 + - name: $norepeat_name
  499 + - phone: $norepeat_phone
  500 + - map_address: $update_map_address
  501 + - long: $update_long
  502 + - lat: $update_lat
  503 + - file: $update_file
  504 + - image: $update_image
480 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)} 505 - multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
481 request: 506 request:
482 url: App.Seller.SetSellerById 507 url: App.Seller.SetSellerById
  1 +- config:
  2 + name: "打印服务"
  3 + request:
  4 + base_url: http://dc1.colorcun.com:10005?s=
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 - name: "菜谱测试1" 10 - name: "菜谱测试1"
11 - sellerid: "15" 11 - sellerid: "15"
12 - status: "1" 12 - status: "1"
  13 + - type: "1"
13 - image: "/Users/orange/cover.jpeg" 14 - image: "/Users/orange/cover.jpeg"
14 - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status,image=$image)} 15 - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status,image=$image)}
15 request: 16 request:
@@ -25,6 +26,7 @@ @@ -25,6 +26,7 @@
25 variable_binds: 26 variable_binds:
26 - sellerid: "15" 27 - sellerid: "15"
27 - status: "1" 28 - status: "1"
  29 + - type: "1"
28 - image: "/Users/orange/cover.jpeg" 30 - image: "/Users/orange/cover.jpeg"
29 - multipart_encoder: ${get_data(sellerid=$sellerid,status=$status,image=$image)} 31 - multipart_encoder: ${get_data(sellerid=$sellerid,status=$status,image=$image)}
30 request: 32 request:
@@ -41,6 +43,7 @@ @@ -41,6 +43,7 @@
41 variable_binds: 43 variable_binds:
42 - name: "菜谱测试1" 44 - name: "菜谱测试1"
43 - status: "1" 45 - status: "1"
  46 + - type: "1"
44 - image: "/Users/orange/cover.jpeg" 47 - image: "/Users/orange/cover.jpeg"
45 - multipart_encoder: ${get_data(name=$name,status=$status,image=$image)} 48 - multipart_encoder: ${get_data(name=$name,status=$status,image=$image)}
46 request: 49 request:
@@ -57,6 +60,7 @@ @@ -57,6 +60,7 @@
57 variable_binds: 60 variable_binds:
58 - name: "菜谱测试1" 61 - name: "菜谱测试1"
59 - sellerid: "15" 62 - sellerid: "15"
  63 + - type: "1"
60 - image: "/Users/orange/cover.jpeg" 64 - image: "/Users/orange/cover.jpeg"
61 - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,image=$image)} 65 - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,image=$image)}
62 request: 66 request:
@@ -74,6 +78,7 @@ @@ -74,6 +78,7 @@
74 - name: "菜谱测试1" 78 - name: "菜谱测试1"
75 - sellerid: "15" 79 - sellerid: "15"
76 - status: "1" 80 - status: "1"
  81 + - type: "1"
77 - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status)} 82 - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status)}
78 request: 83 request:
79 url: App.Menu.AddMenu 84 url: App.Menu.AddMenu
  1 +- config:
  2 + name: "菜谱流程"
  3 + request:
  4 + base_url: http://dc1.colorcun.com:10005?s=
  5 +
  6 +
  7 +- test:
  8 + name: 根据商家ID获取菜谱信息
  9 + request:
  10 + url: App.Menu.GetMenuLists
  11 + method: POST
  12 + data:
  13 + sellerid: 9
  14 + validate:
  15 + - eq: ["content.ret", 200]
  16 +- test:
  17 + name: 添加菜谱(正确操作)
  18 + variable_binds:
  19 + - name: "菜谱测试1"
  20 + - sellerid: "9"
  21 + - type: "1"
  22 + - status: "1"
  23 + - image: "/Users/orange/cover.jpeg"
  24 + - multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status,image=$image)}
  25 + request:
  26 + url: App.Menu.AddMenu
  27 + method: POST
  28 + headers:
  29 + Content-Type: ${get_content_type($multipart_encoder)}
  30 + data: $multipart_encoder
  31 + extract:
  32 + - menu_id: content.data.id
  33 + validate:
  34 + - eq: ["content.ret", 200]
  35 +#根据菜谱ID获取关联菜品数量
  36 +- test:
  37 + name: 根据菜谱ID获取关联菜品数量(有关联菜品)
  38 + request:
  39 + url: App.Menu.GetCookBookNumByMenuId
  40 + method: POST
  41 + data:
  42 + id: $menu_id
  43 + validate:
  44 + - eq: ["content.ret", 200]
  45 +#根据菜谱ID获取菜谱基本信息
  46 +- test:
  47 + name: 根据菜谱ID获取菜谱基本信息(正确操作)
  48 + request:
  49 + url: App.Menu.GetMenuById
  50 + method: POST
  51 + data:
  52 + id: $menu_id
  53 + extract:
  54 + - class_id: content.data.id
  55 + validate:
  56 + - eq: ["content.ret", 200]
  57 +#获取分类下所有菜品
  58 +- test:
  59 + name: 获取分类下所有菜品(正确操作)
  60 + request:
  61 + url: App.Cookbook.GetCookbookByClassId
  62 + method: POST
  63 + data:
  64 + ClassId: 1
  65 + validate:
  66 + - eq: ["content.ret", 200]