Use newer location for iso8601 UTC

iso8601.UTC is correct datetime UTC field object.
iso8601 >= 0.1.12 includes only iso8601.UTC for python3
while both UTC and Utc() for python2. Less then 0.1.12
included both UTC and Utc() for both python2/3.

Some of the occurrences were missed in the previous commit:
934fb45a2de4afe6cb0c8f2d078e19513a3b00e3

This patch fixes those missing occurrences.

Change-Id: Ib6ba40a31bbc0e4a279568bd70fb210ad142d77b
This commit is contained in:
Dinesh Bhor 2017-09-29 12:37:58 +05:30
parent 6165add042
commit 6f21a10b6a
2 changed files with 3 additions and 3 deletions

View File

@ -560,7 +560,7 @@ class TestFlexibleBoolean(TestField):
class TestDateTime(TestField):
def setUp(self):
super(TestDateTime, self).setUp()
self.dt = datetime.datetime(1955, 11, 5, tzinfo=iso8601.iso8601.Utc())
self.dt = datetime.datetime(1955, 11, 5, tzinfo=iso8601.iso8601.UTC)
self.field = fields.DateTimeField()
self.coerce_good_values = [(self.dt, self.dt),
(_utils.isotime(self.dt), self.dt)]
@ -573,7 +573,7 @@ class TestDateTime(TestField):
'1955-11-05T18:00:00Z',
self.field.stringify(
datetime.datetime(1955, 11, 5, 18, 0, 0,
tzinfo=iso8601.iso8601.Utc())))
tzinfo=iso8601.iso8601.UTC)))
def test_get_schema(self):
self.assertEqual({'type': ['string'], 'format': 'date-time',

View File

@ -190,7 +190,7 @@ class TestObjectComparators(test.TestCase):
def test_compare_obj_with_dt(self):
mock_test = mock.Mock()
mock_test.assertEqual = mock.Mock()
dt = datetime.datetime(1955, 11, 5, tzinfo=iso8601.iso8601.Utc())
dt = datetime.datetime(1955, 11, 5, tzinfo=iso8601.iso8601.UTC)
replaced_dt = dt.replace(tzinfo=None)
my_obj = self.MyComparedObjectWithTZ(tzfield=dt)
my_db_obj = {'tzfield': replaced_dt}