Commit 17f15b9ed3fdfb4383e447565fa8c238b354d266
1 parent
ad088b8f
Split service_keywords.py (E-tender)
Showing
3 changed files
with
14 additions
and
38 deletions
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | Library Selenium2Screenshots |
3 | 3 | Library String |
4 | 4 | Library DateTime |
5 | +Library etender_service.py | |
5 | 6 | |
6 | 7 | *** Variables *** |
7 | 8 | ${locator.tenderId} jquery=h3 |
... | ... | @@ -63,8 +64,8 @@ Login |
63 | 64 | [Documentation] |
64 | 65 | ... ${ARGUMENTS[0]} == username |
65 | 66 | ... ${ARGUMENTS[1]} == tender_data |
66 | - ${INITIAL_TENDER_DATA}= procuringEntity_name ${INITIAL_TENDER_DATA} | |
67 | - ${tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
67 | + ${tender_data}= Add_data_for_GUI_FrontEnds ${ARGUMENTS[1]} | |
68 | + ${tender_data}= procuring_entity_name ${tender_data} | |
68 | 69 | ${items}= Get From Dictionary ${tender_data.data} items |
69 | 70 | ${title}= Get From Dictionary ${tender_data.data} title |
70 | 71 | ${description}= Get From Dictionary ${tender_data.data} description | ... | ... |
1 | -from datetime import date, datetime, timedelta | |
2 | -from dateutil.parser import parse | |
3 | -from dateutil.tz import tzlocal | |
4 | 1 | from iso8601 import parse_date |
5 | -from jsonpath_rw import parse as parse_path | |
6 | -from pytz import timezone | |
7 | -from robot.output import LOGGER | |
8 | -from robot.output.loggerhelper import Message | |
9 | -from robot.libraries.BuiltIn import BuiltIn | |
10 | -from robot.errors import HandlerExecutionFailed | |
11 | -from op_robot_tests.tests_files.initial_data import ( | |
12 | - test_tender_data | |
13 | -) | |
14 | -import time | |
15 | - | |
16 | -TIMEZONE = timezone('Europe/Kiev') | |
17 | 2 | |
18 | 3 | |
19 | 4 | def convert_date_to_etender_format(isodate): |
... | ... | @@ -22,7 +7,18 @@ def convert_date_to_etender_format(isodate): |
22 | 7 | return date_string |
23 | 8 | |
24 | 9 | |
10 | +def convert_datetime_for_delivery(isodate): | |
11 | + iso_dt = parse_date(isodate) | |
12 | + date_string = iso_dt.strftime("%Y-%m-%d %H:%M") | |
13 | + return date_string | |
14 | + | |
15 | + | |
25 | 16 | def convert_time_to_etender_format(isodate): |
26 | 17 | iso_dt = parse_date(isodate) |
27 | 18 | time_string = iso_dt.strftime("%H:%M") |
28 | 19 | return time_string |
20 | + | |
21 | + | |
22 | +def procuring_entity_name(INITIAL_TENDER_DATA): | |
23 | + INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"Повна назва невідомо чого" | |
24 | + return INITIAL_TENDER_DATA | ... | ... |
... | ... | @@ -203,24 +203,3 @@ def convert_datetime_to_dot_format(isodate): |
203 | 203 | |
204 | 204 | def local_path_to_file(file_name): |
205 | 205 | return os.path.join(os.path.dirname(__file__), 'documents', file_name) |
206 | - | |
207 | - | |
208 | -## E-Tender | |
209 | -def convert_date_to_etender_format(isodate): | |
210 | - iso_dt=parse_date(isodate) | |
211 | - date_string = iso_dt.strftime("%d-%m-%Y") | |
212 | - return date_string | |
213 | - | |
214 | -def convert_date_for_delivery(isodate): | |
215 | - iso_dt=parse_date(isodate) | |
216 | - date_string = iso_dt.strftime("%Y-%m-%d %H:%M") | |
217 | - return date_string | |
218 | - | |
219 | -def convert_time_to_etender_format(isodate): | |
220 | - iso_dt=parse_date(isodate) | |
221 | - time_string = iso_dt.strftime("%H:%M") | |
222 | - return time_string | |
223 | - | |
224 | -def procuringEntity_name(INITIAL_TENDER_DATA): | |
225 | - INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"Повна назва невідомо чого" | |
226 | - return INITIAL_TENDER_DATA | ... | ... |
Please
register
or
login
to post a comment