|
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 |
@@ -3086,7 +3086,7 @@ def test_server_list_with_changes_since(self): |
3086 | 3086 | self.assertEqual(self.columns, columns) |
3087 | 3087 | self.assertEqual(tuple(self.data), tuple(data)) |
3088 | 3088 |
|
3089 | | - @mock.patch.object(timeutils, 'parse_isotime', side_effect=ValueError) |
| 3089 | + @mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError) |
3090 | 3090 | def test_server_list_with_invalid_changes_since(self, mock_parse_isotime): |
3091 | 3091 |
|
3092 | 3092 | arglist = [ |
@@ -3129,7 +3129,7 @@ def test_server_list_v266_with_changes_before(self): |
3129 | 3129 | self.assertEqual(self.columns, columns) |
3130 | 3130 | self.assertEqual(tuple(self.data), tuple(data)) |
3131 | 3131 |
|
3132 | | - @mock.patch.object(timeutils, 'parse_isotime', side_effect=ValueError) |
| 3132 | + @mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError) |
3133 | 3133 | def test_server_list_v266_with_invalid_changes_before( |
3134 | 3134 | self, mock_parse_isotime): |
3135 | 3135 | self.app.client_manager.compute.api_version = ( |
|
0 commit comments