Replace tests-only dependency - tzlocal (#13413)
This commit is contained in:
Родитель
3a3e739981
Коммит
4437137eff
|
@ -134,7 +134,6 @@ install_requires =
|
|||
thrift>=0.9.2
|
||||
typing;python_version<"3.6"
|
||||
typing-extensions>=3.7.4;python_version<"3.8"
|
||||
tzlocal>=1.4,<2.0.0
|
||||
unicodecsv>=0.14.1
|
||||
urllib3<1.26 # Required to keep boto3 happy
|
||||
werkzeug~=1.0, >=1.0.1
|
||||
|
|
|
@ -22,7 +22,7 @@ import unittest
|
|||
from datetime import datetime
|
||||
from unittest import mock
|
||||
|
||||
from tzlocal import get_localzone
|
||||
from dateutil.tz import tzlocal
|
||||
|
||||
from airflow.exceptions import AirflowException
|
||||
from airflow.providers.amazon.aws.hooks.logs import AwsLogsHook
|
||||
|
@ -478,7 +478,7 @@ class TestSageMakerHook(unittest.TestCase):
|
|||
self.assertFalse(changed)
|
||||
|
||||
def test_secondary_training_status_message_status_changed(self):
|
||||
now = datetime.now(get_localzone())
|
||||
now = datetime.now(tzlocal())
|
||||
SECONDARY_STATUS_DESCRIPTION_1['LastModifiedTime'] = now
|
||||
expected = '{} {} - {}'.format(
|
||||
datetime.utcfromtimestamp(time.mktime(now.timetuple())).strftime('%Y-%m-%d %H:%M:%S'),
|
||||
|
|
Загрузка…
Ссылка в новой задаче