diff options
author | kairat_kushaev <kkushaev@mirantis.com> | 2016-02-01 14:58:42 +0300 |
---|---|---|
committer | Nikhil Komawar <nik.komawar@gmail.com> | 2016-06-09 19:31:02 +0000 |
commit | 2ab2678140165e82d744f36c999b39ea4e416887 (patch) | |
tree | 5b7bde1ea173719ecab01a66481106d7650884fd /glanceclient/tests/unit | |
parent | 10ad2886e1c970cd56b59e5adc6cefe1a206422d (diff) | |
download | python-glanceclient-2ab2678140165e82d744f36c999b39ea4e416887.tar.gz |
Remove deprecated construct method from session init
construct method is marked as deprecated and might be deleted
in one of future releases. So glanceclient need to be aware of
that and initialize sesssion from command line arguments directly.
Change-Id: Ie81b62b7e70bb177f178caadc41554ae88e51b05
Diffstat (limited to 'glanceclient/tests/unit')
-rw-r--r-- | glanceclient/tests/unit/test_shell.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/glanceclient/tests/unit/test_shell.py b/glanceclient/tests/unit/test_shell.py index 6054bfc..87eef7a 100644 --- a/glanceclient/tests/unit/test_shell.py +++ b/glanceclient/tests/unit/test_shell.py @@ -207,14 +207,14 @@ class ShellTest(testutils.TestCase): def test_help(self): shell = openstack_shell.OpenStackImagesShell() argstr = '--os-image-api-version 2 help' - with mock.patch.object(shell, '_get_keystone_session') as et_mock: + with mock.patch.object(shell, '_get_keystone_auth_plugin') as et_mock: actual = shell.main(argstr.split()) self.assertEqual(0, actual) self.assertFalse(et_mock.called) def test_blank_call(self): shell = openstack_shell.OpenStackImagesShell() - with mock.patch.object(shell, '_get_keystone_session') as et_mock: + with mock.patch.object(shell, '_get_keystone_auth_plugin') as et_mock: actual = shell.main('') self.assertEqual(0, actual) self.assertFalse(et_mock.called) @@ -226,21 +226,21 @@ class ShellTest(testutils.TestCase): def test_help_v2_no_schema(self): shell = openstack_shell.OpenStackImagesShell() argstr = '--os-image-api-version 2 help image-create' - with mock.patch.object(shell, '_get_keystone_session') as et_mock: + with mock.patch.object(shell, '_get_keystone_auth_plugin') as et_mock: actual = shell.main(argstr.split()) self.assertEqual(0, actual) self.assertNotIn('<unavailable>', actual) self.assertFalse(et_mock.called) argstr = '--os-image-api-version 2 help md-namespace-create' - with mock.patch.object(shell, '_get_keystone_session') as et_mock: + with mock.patch.object(shell, '_get_keystone_auth_plugin') as et_mock: actual = shell.main(argstr.split()) self.assertEqual(0, actual) self.assertNotIn('<unavailable>', actual) self.assertFalse(et_mock.called) argstr = '--os-image-api-version 2 help md-resource-type-associate' - with mock.patch.object(shell, '_get_keystone_session') as et_mock: + with mock.patch.object(shell, '_get_keystone_auth_plugin') as et_mock: actual = shell.main(argstr.split()) self.assertEqual(0, actual) self.assertNotIn('<unavailable>', actual) @@ -413,7 +413,7 @@ class ShellTest(testutils.TestCase): mock_getpass.assert_called_with('OS Password: ') @mock.patch( - 'glanceclient.shell.OpenStackImagesShell._get_keystone_session') + 'glanceclient.shell.OpenStackImagesShell._get_keystone_auth_plugin') @mock.patch.object(openstack_shell.OpenStackImagesShell, '_cache_schemas', return_value=False) def test_no_auth_with_proj_name(self, cache_schemas, session): |