diff options
| author | Monty Taylor <mordred@inaugust.com> | 2020-07-06 12:10:19 -0500 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2020-10-12 17:29:57 +0100 |
| commit | 9385113d40f3d9dd77f2d7dfa5ebb71d92635548 (patch) | |
| tree | 647570a138036aa7d1fd30b84bfdd50dc9e6d20b /openstackclient/tests/unit/compute | |
| parent | a48c05b90a376ce33e2f0a2d321b8c851a6ef0b0 (diff) | |
| download | python-openstackclient-9385113d40f3d9dd77f2d7dfa5ebb71d92635548.tar.gz | |
Remove oslo.utils
Oslo things are really server-side oriented and are heavy-weight
for client things. Remove oslo.utils and just use iso8601 and
importlib directly. It's not actually a bad library, but pulling
it and its other deps in just for a couple of wrapper methods
is a bit much here.
oslo.i18n, fwiw, is lightweight and helpful.
Change-Id: I463993170c03a1d98c47ab6a3c19131b7fca1099
Diffstat (limited to 'openstackclient/tests/unit/compute')
| -rw-r--r-- | openstackclient/tests/unit/compute/v2/test_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py index 59282b4a..4bdb322e 100644 --- a/openstackclient/tests/unit/compute/v2/test_server.py +++ b/openstackclient/tests/unit/compute/v2/test_server.py @@ -19,11 +19,11 @@ import getpass from unittest import mock from unittest.mock import call +import iso8601 from novaclient import api_versions from openstack import exceptions as sdk_exceptions from osc_lib import exceptions from osc_lib import utils as common_utils -from oslo_utils import timeutils from openstackclient.compute.v2 import server from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes @@ -2945,7 +2945,7 @@ class TestServerList(TestServer): self.assertEqual(self.columns, columns) self.assertEqual(tuple(self.data), tuple(data)) - @mock.patch.object(timeutils, 'parse_isotime', side_effect=ValueError) + @mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError) def test_server_list_with_invalid_changes_since(self, mock_parse_isotime): arglist = [ @@ -2988,7 +2988,7 @@ class TestServerList(TestServer): self.assertEqual(self.columns, columns) self.assertEqual(tuple(self.data), tuple(data)) - @mock.patch.object(timeutils, 'parse_isotime', side_effect=ValueError) + @mock.patch.object(iso8601, 'parse_date', side_effect=iso8601.ParseError) def test_server_list_v266_with_invalid_changes_before( self, mock_parse_isotime): self.app.client_manager.compute.api_version = ( |
