Commit f401af8d0787c0bc79d8365aa178e479a617f579
Merge branch 'v3-dev' of https://git.4k.com.ua/root/playtender-robot_tests into v3-dev
Showing
1 changed file
with
16 additions
and
7 deletions
1 | 1 | # -*- coding: utf-8 - |
2 | 2 | import re |
3 | -import dateutil.parser | |
4 | 3 | |
4 | +import dateutil.parser | |
5 | 5 | from iso8601 import parse_date |
6 | 6 | from robot.libraries.BuiltIn import BuiltIn |
7 | 7 | |
... | ... | @@ -130,12 +130,15 @@ def trigger_input_change_event(locator): |
130 | 130 | def convert_float_to_string(number): |
131 | 131 | return repr(float(number)) |
132 | 132 | |
133 | + | |
133 | 134 | def convert_esco__float_to_string(number): |
134 | 135 | return '{0:.5f}'.format(float(number)) |
135 | 136 | |
137 | + | |
136 | 138 | def convert_float_to_string_3f(number): |
137 | 139 | return '{0:.3f}'.format(float(number)) |
138 | 140 | |
141 | + | |
139 | 142 | # convert any variable to specified type |
140 | 143 | def convert_to_specified_type(value, type): |
141 | 144 | value = "%s" % (value) |
... | ... | @@ -242,6 +245,7 @@ def prepare_tender_data(data): |
242 | 245 | lot['features'].append(data['features'].pop(i)) |
243 | 246 | l = l - 1 |
244 | 247 | i = i - 1 |
248 | + break | |
245 | 249 | if data['features'][i]['featureOf'] == 'item': |
246 | 250 | for item in data['items']: |
247 | 251 | if item['id'] == data['features'][i]['relatedItem']: |
... | ... | @@ -250,6 +254,7 @@ def prepare_tender_data(data): |
250 | 254 | item['features'].append(data['features'].pop(i)) |
251 | 255 | l = l - 1 |
252 | 256 | i = i - 1 |
257 | + break | |
253 | 258 | i = i + 1 |
254 | 259 | |
255 | 260 | if 'features' in data: |
... | ... | @@ -267,6 +272,7 @@ def prepare_tender_data(data): |
267 | 272 | lot['items'].append(data['items'].pop(i)) |
268 | 273 | l = l - 1 |
269 | 274 | i = i - 1 |
275 | + break | |
270 | 276 | i = i + 1 |
271 | 277 | |
272 | 278 | del data['items'] |
... | ... | @@ -284,24 +290,27 @@ def prepare_tender_data(data): |
284 | 290 | lot['milestones'].append(data['milestones'].pop(i)) |
285 | 291 | l = l - 1 |
286 | 292 | i = i - 1 |
293 | + break | |
287 | 294 | i = i + 1 |
288 | 295 | |
289 | 296 | del data['milestones'] |
290 | 297 | |
291 | 298 | return data |
292 | 299 | |
300 | + | |
293 | 301 | def split_agreementDuration(str, type): |
294 | 302 | if type in 'year': |
295 | - year_temp = str.split('Y',1) | |
296 | - value = year_temp[0].split('P',1) | |
303 | + year_temp = str.split('Y', 1) | |
304 | + value = year_temp[0].split('P', 1) | |
297 | 305 | elif type in 'month': |
298 | - month_temp = str.split('M',1) | |
299 | - value = month_temp[0].split('Y',1) | |
306 | + month_temp = str.split('M', 1) | |
307 | + value = month_temp[0].split('Y', 1) | |
300 | 308 | else: |
301 | - day_temp = str.split('D',1) | |
302 | - value = day_temp[0].split('M',1) | |
309 | + day_temp = str.split('D', 1) | |
310 | + value = day_temp[0].split('M', 1) | |
303 | 311 | return value[1] |
304 | 312 | |
313 | + | |
305 | 314 | def convert_date_to_string_contr(date): |
306 | 315 | date = dateutil.parser.parse(date) |
307 | 316 | date = date.strftime("%d.%m.%Y %H:%M:%S") | ... | ... |
Please
register
or
login
to post a comment