I am trying to adapt a code from windows to macOS for some automation with python and selenium where an assertion between 2 dates is performed. On windows everything works as expected , but same code is not working when running it on macOS.
Here is the code during debugging(with values for api_date and api_processed_date):
api_date = response.json()['current_version']['file']['created'][:10] api_date: 2021-06-02 00:00:00
# process the date to have the same format as in frontend
api_date = datetime.strptime(api_date, '%Y-%m-%d')
api_processed_date = datetime.strftime(api_date, "%b %#d, %Y") api_processed_date: "Jun #d 2021"
# verify info displayed in page
page = Versions(selenium, base_url)
selenium.get(f'{base_url}/addon/{variables["addon_version_install"]}/versions/')
assert page.versions_list[0].version_number == addon_version
assert addon_size == page.versions_list[0].version_size
assert page.versions_list[0].released_date == api_processed_date
Any idea how to modify this to work on MacOS?
Thanks
I expect that the last assertion to be true