Replaced deprecated timeutils methods
Since oslo 1.6.0 timeutils.isotime() and timeutils.strtime() methods
are deprecated.
DeprecationWarning: Using function/method
'oslo_utils.timeutils.strtime()' is deprecated in version '1.6' and
will be removed in a future version: use either
datetime.datetime.isoformat() or datetime.datetime.strftime() instead
Change-Id: If69bd8a6bee052556ba8853afef3941bcd1e7b13
Closes-Bug: 1479056
Co-Authored-By: Diana Clarke <diana.joan.clarke@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ from nova.objects import fixed_ip
|
||||
from nova.tests.unit import fake_instance
|
||||
from nova.tests.unit.objects import test_network
|
||||
from nova.tests.unit.objects import test_objects
|
||||
|
||||
from nova import utils
|
||||
|
||||
fake_fixed_ip = {
|
||||
'created_at': None,
|
||||
@@ -210,7 +210,7 @@ class _TestFixedIPObject(object):
|
||||
def test_disassociate_all_by_timeout(self, disassociate):
|
||||
now = timeutils.utcnow()
|
||||
now_tz = timeutils.parse_isotime(
|
||||
timeutils.isotime(now)).replace(
|
||||
utils.isotime(now)).replace(
|
||||
tzinfo=iso8601.iso8601.Utc())
|
||||
disassociate.return_value = 123
|
||||
result = fixed_ip.FixedIP.disassociate_all_by_timeout(self.context,
|
||||
|
||||
Reference in New Issue
Block a user