Fix some version typo
Change-Id: Ieac75bf2c820baf7e449fb269461881fa2ffee24
This commit is contained in:
parent
62762c0724
commit
2193dd2c3f
|
@ -24,11 +24,11 @@ class TestBase(utils.TestCommand):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class TestBaremetalComputeV1(TestBase):
|
class TestEventV2(TestBase):
|
||||||
"""Test case base class for the unit tests of Baremetal Compute V1 API."""
|
"""Test case base class for the unit tests of Event server V1 API."""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestBaremetalComputeV1, self).setUp()
|
super(TestEventV2, self).setUp()
|
||||||
|
|
||||||
fake_client = fakes.FakeBaremetalComputeV1Client()
|
fake_client = fakes.FakeTestEventV2Client()
|
||||||
self.app.client_manager.event = fake_client
|
self.app.client_manager.event = fake_client
|
||||||
|
|
|
@ -50,7 +50,7 @@ def create_resource_manager():
|
||||||
return FakeManager()
|
return FakeManager()
|
||||||
|
|
||||||
|
|
||||||
class FakeBaremetalComputeV1Client(object):
|
class FakeTestEventV2Client(object):
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.fake_http_client = mock.Mock()
|
self.fake_http_client = mock.Mock()
|
||||||
|
|
|
@ -21,9 +21,9 @@ from pankoclient.osc import plugin
|
||||||
from pankoclient.tests.unit import base
|
from pankoclient.tests.unit import base
|
||||||
|
|
||||||
|
|
||||||
class TestBaremetalComputePlugin(base.TestBase):
|
class TestEventPlugin(base.TestBase):
|
||||||
|
|
||||||
@mock.patch('pankoclient.v1.client.Client')
|
@mock.patch('pankoclient.v2.client.Client')
|
||||||
def test_make_client_with_session(self, panko_client):
|
def test_make_client_with_session(self, panko_client):
|
||||||
instance = mock.Mock()
|
instance = mock.Mock()
|
||||||
instance._api_version = {
|
instance._api_version = {
|
||||||
|
@ -50,7 +50,7 @@ class TestBaremetalComputePlugin(base.TestBase):
|
||||||
session='fake_session',
|
session='fake_session',
|
||||||
)
|
)
|
||||||
|
|
||||||
@mock.patch('pankoclient.v1.client.Client')
|
@mock.patch('pankoclient.v2.client.Client')
|
||||||
def test_make_client_no_session(self, panko_client):
|
def test_make_client_no_session(self, panko_client):
|
||||||
instance = mock.Mock()
|
instance = mock.Mock()
|
||||||
instance._api_version = {
|
instance._api_version = {
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Client(object):
|
||||||
"""Client for the Panko v2 API."""
|
"""Client for the Panko v2 API."""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
"""Initialize a new client for the Panko v1 API."""
|
"""Initialize a new client for the Panko v2 API."""
|
||||||
self.http_client = http._construct_http_client(*args, **kwargs)
|
self.http_client = http._construct_http_client(*args, **kwargs)
|
||||||
self.capabilities = capabilities.CapabilitiesManager(self.http_client)
|
self.capabilities = capabilities.CapabilitiesManager(self.http_client)
|
||||||
self.event = events.EventManager(self.http_client)
|
self.event = events.EventManager(self.http_client)
|
||||||
|
|
Loading…
Reference in New Issue