Index: tst_settings_information/test.py =================================================================== diff -u -r4800083679383c87221a7e55ad35f84b40ffb386 -r08e8472c567ebd5cbe4537cc8f2e9658033e5c24 --- tst_settings_information/test.py (.../test.py) (revision 4800083679383c87221a7e55ad35f84b40ffb386) +++ tst_settings_information/test.py (.../test.py) (revision 08e8472c567ebd5cbe4537cc8f2e9658033e5c24) @@ -215,6 +215,7 @@ and 'DG next service date' and verify the same is displayed on UI screen """ + dateFormat = "%m/%02d/%Y" # MM/dd/yyyy test.startSection("Verify 'HD last service date', 'HD next service date', 'DG next service date' and 'DG next service date' is displayed on UI screen") hd_epoch = builtins.int(datetime.datetime(hd_year, hd_month, hd_day).timestamp()) hd_interval = hd_interval_days * 86400 @@ -223,12 +224,12 @@ hd_simulator.cmd_send_hd_general_response(message_id=138, accepted=0, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) utils.waitForGUI(1) hd_last_service_date = datetime.datetime(hd_year, hd_month, hd_day) - hd_last_service_date = str(hd_last_service_date.strftime("%Y/%m/%02d")) + hd_last_service_date = str(hd_last_service_date.strftime(dateFormat)) hd_last_service_date_text = waitForObjectExists(service_date_obj(hd_last_service_date)) test.compare(hd_last_service_date_text.text, hd_last_service_date, "'HD last service date' should be {}".format(hd_last_service_date)) hd_next_service_date = datetime.datetime(hd_year, hd_month, hd_day) + datetime.timedelta(days=hd_interval_days) - hd_next_service_date = str(hd_next_service_date.strftime("%Y/%m/%02d")) + hd_next_service_date = str(hd_next_service_date.strftime(dateFormat)) hd_next_service_date_text = waitForObjectExists(service_date_obj(hd_next_service_date)) test.compare(hd_next_service_date_text.text, hd_next_service_date, "'HD next service date' should be {}".format(hd_next_service_date)) @@ -239,12 +240,12 @@ dg_simulator.cmd_send_dg_general_response(message_id=140, accepted=0, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) utils.waitForGUI(1) dg_last_service_date = datetime.datetime(dg_year, dg_month, dg_day) - dg_last_service_date = str(dg_last_service_date.strftime("%Y/%m/%02d")) + dg_last_service_date = str(dg_last_service_date.strftime(dateFormat)) dg_last_service_date_text = waitForObjectExists(service_date_obj(dg_last_service_date)) test.compare(dg_last_service_date_text.text, dg_last_service_date, "'DG last service date' should be {}".format(dg_last_service_date)) dg_next_service_date = datetime.datetime(dg_year, dg_month, dg_day) + datetime.timedelta(days=dg_interval_days) - dg_next_service_date = str(dg_next_service_date.strftime("%Y/%m/%02d")) + dg_next_service_date = str(dg_next_service_date.strftime(dateFormat)) dg_next_service_date_text = waitForObjectExists(service_date_obj(dg_next_service_date)) test.compare(dg_next_service_date_text.text, dg_next_service_date, "'DG last service date' should be {}".format(dg_next_service_date)) test.endSection()