Index: tst_settings_information/test.py =================================================================== diff -u -r6f1e1819d6605964e7ba8366d0408cc26890be99 -r6dea78f296538eaec9a3478608f5ba0be9e9c954 --- tst_settings_information/test.py (.../test.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) +++ tst_settings_information/test.py (.../test.py) (revision 6dea78f296538eaec9a3478608f5ba0be9e9c954) @@ -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() @@ -610,7 +611,7 @@ 1)application """ try: - utility.rename_file(config.APPLICATION_FOLDER_LOCATION,"application") + utility.rename_file(config.APPLICATION_FOLDER_LOCATION,"unittests") utils.waitForGUI(0.2) test.log("Navigating to 'Volume and Brightness' screen") mouseClick(waitForObjectExists(settings_text_obj(config.VOLUME_AND_BRIGHTNESS_TEXT))) @@ -634,7 +635,7 @@ except: test.log(str("Failed to verify missing path scenario")) finally: - utility.rename_old_name(config.APPLICATION_FOLDER_LOCATION,"application") + utility.rename_old_name(config.APPLICATION_FOLDER_LOCATION,"unittests") def verify_volume_and_brightness_settings(): test.log("Navigating to 'Volume and Brightness' screen")