|
19 | 19 | from unittest import mock |
20 | 20 | from unittest.mock import call |
21 | 21 |
|
| 22 | +import iso8601 |
22 | 23 | from novaclient import api_versions |
23 | 24 | from openstack import exceptions as sdk_exceptions |
24 | 25 | from osc_lib import exceptions |
25 | 26 | from osc_lib import utils as common_utils |
26 | | -from oslo_utils import timeutils |
27 | 27 |
|
28 | 28 | from openstackclient.compute.v2 import server |
29 | 29 | from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes |
@@ -2945,7 +2945,7 @@ def test_server_list_with_changes_since(self): |
2945 | 2945 | self.assertEqual(self.columns, columns) |
2946 | 2946 | self.assertEqual(tuple(self.data), tuple(data)) |
2947 | 2947 |
|
2948 | | - @mock.patch.object(timeutils, 'parse_isotime', side_effect=ValueError) |
| 2948 | + @mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError) |
2949 | 2949 | def test_server_list_with_invalid_changes_since(self, mock_parse_isotime): |
2950 | 2950 |
|
2951 | 2951 | arglist = [ |
@@ -2988,7 +2988,7 @@ def test_server_list_v266_with_changes_before(self): |
2988 | 2988 | self.assertEqual(self.columns, columns) |
2989 | 2989 | self.assertEqual(tuple(self.data), tuple(data)) |
2990 | 2990 |
|
2991 | | - @mock.patch.object(timeutils, 'parse_isotime', side_effect=ValueError) |
| 2991 | + @mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError) |
2992 | 2992 | def test_server_list_v266_with_invalid_changes_before( |
2993 | 2993 | self, mock_parse_isotime): |
2994 | 2994 | self.app.client_manager.compute.api_version = ( |
|
0 commit comments