Commit 7fae60a072357aa9f8465abdbd2de5965c7371ab
1 parent
8981b8eb
Rename and reorder several service keywords
Showing
3 changed files
with
21 additions
and
17 deletions
| ... | ... | @@ -48,11 +48,11 @@ Login |
| 48 | 48 | Login |
| 49 | 49 | |
| 50 | 50 | ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate |
| 51 | - ${start_date}= convert_date_to_prom_format ${start_date} | |
| 51 | + ${start_date}= convert_datetime_to_dot_format ${start_date} | |
| 52 | 52 | ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate |
| 53 | - ${end_date}= convert_date_to_prom_format ${end_date} | |
| 53 | + ${end_date}= convert_datetime_to_dot_format ${end_date} | |
| 54 | 54 | ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate |
| 55 | - ${enquiry_end_date}= convert_date_to_prom_format ${enquiry_end_date} | |
| 55 | + ${enquiry_end_date}= convert_datetime_to_dot_format ${enquiry_end_date} | |
| 56 | 56 | |
| 57 | 57 | ${items}= Get From Dictionary ${ARGUMENTS[1].data} items |
| 58 | 58 | ${delivery_date}= Get From Dictionary ${items[0].deliveryDate} endDate | ... | ... |
| ... | ... | @@ -39,7 +39,7 @@ ${telephone} +380976535447 |
| 39 | 39 | ${step_rate}= Get From Dictionary ${prepared_tender_data.data.minimalStep} amount |
| 40 | 40 | ${countryName}= Get From Dictionary ${prepared_tender_data.data.procuringEntity.address} countryName |
| 41 | 41 | ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
| 42 | - ${delivery_end_date}= convert_date_to_prom_format ${delivery_end_date} | |
| 42 | + ${delivery_end_date}= convert_datetime_to_dot_format ${delivery_end_date} | |
| 43 | 43 | ${cpv}= Convert To String "Картонки" |
| 44 | 44 | ${cpv_id}= Get From Dictionary ${items[0].classification} id |
| 45 | 45 | ${cpv_id_1}= Get Substring ${cpv_id} 0 3 | ... | ... |
| ... | ... | @@ -98,12 +98,6 @@ def log_object_data(data, file_name=None, format="yaml"): |
| 98 | 98 | file_obj.write(data) |
| 99 | 99 | |
| 100 | 100 | |
| 101 | -def convert_date_to_prom_format(isodate): | |
| 102 | - iso_dt = parse_date(isodate) | |
| 103 | - day_string = iso_dt.strftime("%d.%m.%Y %H:%M") | |
| 104 | - return day_string | |
| 105 | - | |
| 106 | - | |
| 107 | 101 | def load_initial_data_from(file_name): |
| 108 | 102 | if not os.path.exists(file_name): |
| 109 | 103 | file_name = os.path.join(os.path.dirname(__file__), 'data/{}'.format(file_name)) |
| ... | ... | @@ -184,23 +178,33 @@ def wait_to_date(date_stamp): |
| 184 | 178 | return 0 |
| 185 | 179 | return wait_seconds |
| 186 | 180 | |
| 187 | -##GUI Frontends common | |
| 188 | -def convert_date_to_slash_format(isodate): | |
| 189 | - iso_dt=parse_date(isodate) | |
| 190 | - date_string = iso_dt.strftime("%d/%m/%Y") | |
| 191 | - return date_string | |
| 192 | 181 | |
| 193 | -def Add_data_for_GUI_FrontEnds(INITIAL_TENDER_DATA): | |
| 194 | - now = datetime.now() | |
| 182 | +##GUI Frontends common | |
| 183 | +def add_data_for_gui_frontends(INITIAL_TENDER_DATA): | |
| 184 | + now = datetime.now() | |
| 195 | 185 | #INITIAL_TENDER_DATA.data.enquiryPeriod['startDate'] = (now + timedelta(minutes=2)).isoformat() |
| 196 | 186 | INITIAL_TENDER_DATA.data.enquiryPeriod['endDate'] = (now + timedelta(minutes=6)).isoformat() |
| 197 | 187 | INITIAL_TENDER_DATA.data.tenderPeriod['startDate'] = (now + timedelta(minutes=7)).isoformat() |
| 198 | 188 | INITIAL_TENDER_DATA.data.tenderPeriod['endDate'] = (now + timedelta(minutes=11)).isoformat() |
| 199 | 189 | return INITIAL_TENDER_DATA |
| 200 | 190 | |
| 191 | + | |
| 192 | +def convert_date_to_slash_format(isodate): | |
| 193 | + iso_dt = parse_date(isodate) | |
| 194 | + date_string = iso_dt.strftime("%d/%m/%Y") | |
| 195 | + return date_string | |
| 196 | + | |
| 197 | + | |
| 198 | +def convert_datetime_to_dot_format(isodate): | |
| 199 | + iso_dt = parse_date(isodate) | |
| 200 | + day_string = iso_dt.strftime("%d.%m.%Y %H:%M") | |
| 201 | + return day_string | |
| 202 | + | |
| 203 | + | |
| 201 | 204 | def local_path_to_file(file_name): |
| 202 | 205 | return os.path.join(os.path.dirname(__file__), 'documents', file_name) |
| 203 | 206 | |
| 207 | + | |
| 204 | 208 | ## E-Tender |
| 205 | 209 | def convert_date_to_etender_format(isodate): |
| 206 | 210 | iso_dt=parse_date(isodate) | ... | ... |
Please
register
or
login
to post a comment