Skip to content

Commit 78ce548

Browse files
fixed a unit test for older versions of python
1 parent dc6abfc commit 78ce548

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/CLI/modules/dns_tests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
import json
88
import os.path
9+
import sys
910

1011
import mock
1112

@@ -281,6 +282,7 @@ def test_issues_999(self):
281282
self.assertEqual(actual_output['record'], '')
282283

283284
def test_list_zones_no_update(self):
285+
pyversion = sys.version_info
284286
fake_zones = [
285287
{
286288
'name': 'example.com',
@@ -294,4 +296,7 @@ def test_list_zones_no_update(self):
294296

295297
self.assert_no_fail(result)
296298
actual_output = json.loads(result.output)
297-
self.assertEqual(actual_output[0]['updated'], '2014-03-07 00:00')
299+
if pyversion.major >= 3 and pyversion.minor >= 7:
300+
self.assertEqual(actual_output[0]['updated'], '2014-03-07 00:00')
301+
else:
302+
self.assertEqual(actual_output[0]['updated'], '2014-03-07T00:00:00-06:00')

0 commit comments

Comments
 (0)