@@ -9,39 +9,41 @@ class TestUtils(unittest.TestCase):
9
9
10
10
@patch ("pypetkitapi.utils.ZoneInfo" )
11
11
@patch ("pypetkitapi.utils.datetime" )
12
- def test_get_timezone_offset_valid (self , mock_datetime , mock_zoneinfo ):
12
+ async def test_get_timezone_offset_valid (self , mock_datetime , mock_zoneinfo ):
13
13
# Mock datetime and ZoneInfo
14
14
mock_zoneinfo .return_value = "MockedZone"
15
15
mock_now = mock_datetime .now .return_value
16
16
mock_now .utcoffset .return_value .total_seconds .return_value = 3600
17
17
18
- offset = get_timezone_offset ("MockedZone" )
18
+ offset = await get_timezone_offset ("MockedZone" )
19
19
self .assertEqual (offset , "1.0" )
20
20
21
21
@patch ("pypetkitapi.utils.ZoneInfo" )
22
22
@patch ("pypetkitapi.utils.datetime" )
23
- def test_get_timezone_offset_no_offset (self , mock_datetime , mock_zoneinfo ):
23
+ async def test_get_timezone_offset_no_offset (self , mock_datetime , mock_zoneinfo ):
24
24
# Mock datetime and ZoneInfo
25
25
mock_zoneinfo .return_value = "MockedZone"
26
26
mock_now = mock_datetime .now .return_value
27
27
mock_now .utcoffset .return_value = None
28
28
29
- offset = get_timezone_offset ("MockedZone" )
29
+ offset = await get_timezone_offset ("MockedZone" )
30
30
self .assertEqual (offset , "0.0" )
31
31
32
32
@patch ("pypetkitapi.utils.ZoneInfo" , side_effect = ZoneInfoNotFoundError )
33
- def test_get_timezone_offset_invalid_zone (self , mock_zoneinfo ):
33
+ async def test_get_timezone_offset_invalid_zone (self , mock_zoneinfo ):
34
34
offset = get_timezone_offset ("InvalidZone" )
35
35
self .assertEqual (offset , "0.0" )
36
36
37
37
@patch ("pypetkitapi.utils.ZoneInfo" )
38
38
@patch ("pypetkitapi.utils.datetime" )
39
- def test_get_timezone_offset_attribute_error (self , mock_datetime , mock_zoneinfo ):
39
+ async def test_get_timezone_offset_attribute_error (
40
+ self , mock_datetime , mock_zoneinfo
41
+ ):
40
42
# Mock datetime and ZoneInfo
41
43
mock_zoneinfo .return_value = "MockedZone"
42
44
mock_datetime .now .side_effect = AttributeError
43
45
44
- offset = get_timezone_offset ("MockedZone" )
46
+ offset = await get_timezone_offset ("MockedZone" )
45
47
self .assertEqual (offset , "0.0" )
46
48
47
49
0 commit comments