Skip to content

Commit 415c901

Browse files
fixed the CLI test for 2038 issue as well
1 parent b87c1f1 commit 415c901

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/CLI/modules/cdn_tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
55
:license: MIT, see LICENSE for more details.
66
"""
7+
import datetime
78
import json
9+
from unittest import mock as mock
810

911
from SoftLayer.CLI import exceptions
1012
from SoftLayer import testing
@@ -25,7 +27,9 @@ def test_list_accounts(self):
2527
'vendor': 'akamai'}]
2628
)
2729

28-
def test_detail_account(self):
30+
@mock.patch('SoftLayer.utils.days_to_datetime')
31+
def test_detail_account(self, mock_now):
32+
mock_now.return_value = datetime.datetime(2020, 1, 1)
2933
result = self.run_command(['cdn', 'detail', '--history=30', '1245'])
3034

3135
self.assert_no_fail(result)

0 commit comments

Comments
 (0)