Replace keystoneclient session with keystoneauth
keystoneclient.session has been long deprecated in favor of keystoneauth1.session. This change corrects the import to use keystoneauth1.session instead of keystoneclient.session as well as testing mocks. Change-Id: Ibb59464486830d53c6028ce13480fb2a4ea718bb
This commit is contained in:
parent
04c816ed03
commit
b59c693193
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
from barbicanclient import client as barbican_client
|
||||
from keystoneclient import session
|
||||
from keystoneauth1 import session
|
||||
from nova import exception
|
||||
from os_win._i18n import _
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class PDKTestCase(test_base.HyperVBaseTestCase):
|
|||
mock_instance, image_meta)
|
||||
|
||||
@mock.patch('barbicanclient.client.Client')
|
||||
@mock.patch('keystoneclient.session.Session')
|
||||
@mock.patch('keystoneauth1.session.Session')
|
||||
def test_get_pdk_container(self, mock_session, mock_barbican_client):
|
||||
instance = mock.MagicMock()
|
||||
context = mock.MagicMock()
|
||||
|
@ -100,7 +100,7 @@ class PDKTestCase(test_base.HyperVBaseTestCase):
|
|||
mock_barbican_client.assert_called_once_with(session=sess)
|
||||
|
||||
@mock.patch('barbicanclient.client.Client')
|
||||
@mock.patch('keystoneclient.session.Session')
|
||||
@mock.patch('keystoneauth1.session.Session')
|
||||
def test_get_pdk_container_exception(self, mock_session,
|
||||
mock_barbican_client):
|
||||
instance = mock.MagicMock()
|
||||
|
|
Loading…
Reference in New Issue