6
6
7
7
from django .test import TestCase
8
8
9
- from appointment .settings import APP_TIME_ZONE
10
9
from appointment .utils .date_time import (
11
10
combine_date_and_time , convert_12_hour_time_to_24_hour_time , convert_24_hour_time_to_12_hour_time ,
12
11
convert_minutes_in_human_readable_format , convert_str_to_date ,
13
- convert_str_to_time , get_ar_end_time , get_current_year , get_timestamp , get_timezone , get_weekday_num ,
12
+ convert_str_to_time , get_ar_end_time , get_current_year , get_timestamp , get_weekday_num ,
14
13
time_difference
15
14
)
16
15
@@ -378,10 +377,6 @@ def test_get_timestamp(self, mock_now):
378
377
379
378
380
379
class GeneralDateTimeTests (TestCase ):
381
- def test_get_timezone (self ):
382
- """Test get_timezone function"""
383
- self .assertEqual (get_timezone (), APP_TIME_ZONE )
384
-
385
380
def test_get_current_year (self ):
386
381
"""Test get_current_year function"""
387
382
self .assertEqual (get_current_year (), datetime .datetime .now ().year )
@@ -392,11 +387,6 @@ def test_get_current_year_mocked(self):
392
387
mock_date .now .return_value .year = 1999 # Setting year attribute of the mock object
393
388
self .assertEqual (get_current_year (), 1999 )
394
389
395
- @patch ('appointment.utils.date_time.APP_TIME_ZONE' , new = "Asia/Tokyo" )
396
- def test_get_timezone_with_modified_setting (self ):
397
- """Test get_timezone function with a modified timezone setting."""
398
- self .assertEqual (get_timezone (), "Asia/Tokyo" )
399
-
400
390
def test_get_weekday_num (self ):
401
391
"""Test get_weekday_num function with valid input"""
402
392
self .assertEqual (get_weekday_num ("Monday" ), 1 )
0 commit comments