-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Home Assistant is getting more picky about blocking operations done in the event loop, so we need to make sure that reading timezone information from disk is done asynchronously here.
- Loading branch information
Showing
6 changed files
with
50 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
"""Tests for regions.""" | ||
from zoneinfo import ZoneInfo | ||
|
||
from spothinta_api.const import REGION_TO_TIMEZONE, Region | ||
|
||
|
||
async def test_each_region_has_a_time_zone() -> None: | ||
"""Tests that each region has a time zone set.""" | ||
for region in Region: | ||
assert isinstance(REGION_TO_TIMEZONE[region], ZoneInfo) | ||
assert isinstance(REGION_TO_TIMEZONE[region], str) |