Fix Withings timezone test (#32602)

This commit is contained in:
Franck Nijhof 2020-03-09 13:45:39 +01:00 committed by GitHub
parent a6e0ab2b3a
commit c0c5c33b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ async def test_data_manager_update_sleep_date_range(
"""Test method."""
patch_time_zone = patch(
"homeassistant.util.dt.DEFAULT_TIME_ZONE",
new=dt.get_time_zone("America/Los_Angeles"),
new=dt.get_time_zone("America/Belize"),
)
with patch_time_zone:
@ -126,10 +126,10 @@ async def test_data_manager_update_sleep_date_range(
startdate = call_args.get("startdate")
enddate = call_args.get("enddate")
assert startdate.tzname() == "PST"
assert startdate.tzname() == "CST"
assert enddate.tzname() == "PST"
assert startdate.tzname() == "PST"
assert enddate.tzname() == "CST"
assert startdate.tzname() == "CST"
assert update_start_time < enddate
assert enddate < update_start_time + timedelta(seconds=1)
assert enddate > startdate