Commit 205caf2665a8e88326205eb1d3f3aaf2d650812f
1 parent
8a345fda
Add get_number_of_minutes function
Showing
3 changed files
with
7 additions
and
2 deletions
@@ -15,7 +15,9 @@ Resource base_keywords.robot | @@ -15,7 +15,9 @@ Resource base_keywords.robot | ||
15 | 15 | ||
16 | 16 | ||
17 | Можливість продовжити період подання пропозиції на ${number_of_days} днів | 17 | Можливість продовжити період подання пропозиції на ${number_of_days} днів |
18 | - ${endDate}= add_minutes_to_date ${USERS.users['${tender_owner}'].tender_data.data.tenderPeriod.endDate} ${number_of_days} | 18 | + ${period_intervals}= compute_intrs ${BROKERS} ${used_brokers} |
19 | + ${number_of_minutes}= get_number_of_minutes ${number_of_days} ${period_intervals.${MODE}.accelerator} | ||
20 | + ${endDate}= add_minutes_to_date ${USERS.users['${tender_owner}'].tender_data.data.tenderPeriod.endDate} ${number_of_minutes} | ||
19 | Можливість змінити поле tenderPeriod.endDate тендера на ${endDate} | 21 | Можливість змінити поле tenderPeriod.endDate тендера на ${endDate} |
20 | Remove From Dictionary ${USERS.users['${tender_owner}'].tender_data.data.tenderPeriod} endDate | 22 | Remove From Dictionary ${USERS.users['${tender_owner}'].tender_data.data.tenderPeriod} endDate |
21 | 23 |
@@ -50,6 +50,8 @@ def subtraction(value1, value2): | @@ -50,6 +50,8 @@ def subtraction(value1, value2): | ||
50 | def create_fake_value_amount(): | 50 | def create_fake_value_amount(): |
51 | return fake.random_int(min=1) | 51 | return fake.random_int(min=1) |
52 | 52 | ||
53 | +def get_number_of_minutes(days, accelerator): | ||
54 | + return 1440 * int(days) / accelerator | ||
53 | 55 | ||
54 | def field_with_id(prefix, sentence): | 56 | def field_with_id(prefix, sentence): |
55 | return u"{}-{}: {}".format(prefix, fake.uuid4()[:8], sentence) | 57 | return u"{}-{}: {}".format(prefix, fake.uuid4()[:8], sentence) |
@@ -52,10 +52,11 @@ from .initial_data import ( | @@ -52,10 +52,11 @@ from .initial_data import ( | ||
52 | create_fake_value_amount, | 52 | create_fake_value_amount, |
53 | test_change_document_data, | 53 | test_change_document_data, |
54 | convert_amount, | 54 | convert_amount, |
55 | + get_number_of_minutes, | ||
55 | ) | 56 | ) |
56 | from barbecue import chef | 57 | from barbecue import chef |
57 | from restkit import request | 58 | from restkit import request |
58 | -# End of non-pointless imports | 59 | +# End of non-pointless import |
59 | import os | 60 | import os |
60 | import re | 61 | import re |
61 | 62 |
Please
register
or
login
to post a comment