Get rid of the oslo.utils requirement

It's only used in unit tests and can be easily replaced.

Change-Id: Ice6439c73df9dce03cdaed4eae2bf0498d0ae814
This commit is contained in:
Dmitry Tantsur 2020-04-06 14:03:13 +02:00
parent 570ab42404
commit 159a91b136
2 changed files with 4 additions and 6 deletions

View File

@ -13,11 +13,10 @@
import collections
import unittest
import uuid
from keystoneauth1 import session
import mock
from oslo_utils import netutils
from oslo_utils import uuidutils
import ironic_inspector_client
from ironic_inspector_client.common import http
@ -34,7 +33,7 @@ FAKE_HEADERS = {
return_value=mock.Mock(headers=FAKE_HEADERS,
status_code=200))
class TestInit(unittest.TestCase):
my_ip = 'http://' + netutils.get_my_ipv4() + ':5050'
my_ip = 'http://127.0.0.1:5050'
def get_client(self, **kwargs):
kwargs.setdefault('inspector_url', self.my_ip)
@ -68,8 +67,8 @@ class TestInit(unittest.TestCase):
class BaseTest(unittest.TestCase):
def setUp(self):
super(BaseTest, self).setUp()
self.uuid = uuidutils.generate_uuid()
self.my_ip = 'http://' + netutils.get_my_ipv4() + ':5050'
self.uuid = str(uuid.uuid4())
self.my_ip = 'http://127.0.0.1:5050'
@mock.patch.object(http.BaseClient, 'server_api_versions',
lambda self: ((1, 0), (1, 99)))

View File

@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later.
keystoneauth1>=3.4.0 # Apache-2.0
osc-lib>=1.8.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
PyYAML>=3.12 # MIT
requests>=2.14.2 # Apache-2.0