diff options
author | Telles Nobrega <tenobreg@redhat.com> | 2018-07-18 14:22:50 -0300 |
---|---|---|
committer | Telles Nobrega <tenobreg@redhat.com> | 2018-07-19 11:41:09 -0300 |
commit | 851b2621b6219d45cf8d2786d064e25e8fd49e8c (patch) | |
tree | 11ca13137b0b384ff3d28fb798a08b26087ce168 /saharaclient/tests/unit/osc/test_plugin.py | |
parent | db3ade4fc72f10f14deb424fccd9d8e6f5e5bb4e (diff) | |
download | python-saharaclient-851b2621b6219d45cf8d2786d064e25e8fd49e8c.tar.gz |
Adding boot from volume to osc
Adding boot from volume to python-sahahraclient CLI.
Change-Id: I302aaeb7a0f831730301162f8c51e0eebcbd66f8
Story: #2001820
Task: #12559
Diffstat (limited to 'saharaclient/tests/unit/osc/test_plugin.py')
-rw-r--r-- | saharaclient/tests/unit/osc/test_plugin.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/saharaclient/tests/unit/osc/test_plugin.py b/saharaclient/tests/unit/osc/test_plugin.py index 5006c5c..cf5ac7d 100644 --- a/saharaclient/tests/unit/osc/test_plugin.py +++ b/saharaclient/tests/unit/osc/test_plugin.py @@ -36,3 +36,19 @@ class TestDataProcessingPlugin(base.BaseTestCase): region_name='region_name', sahara_url='url', endpoint_type='public') + + @mock.patch("saharaclient.api.client.ClientV2") + def test_make_client_v2(self, p_client): + + instance = mock.Mock() + instance._api_version = {"data_processing": '2'} + instance.session = 'session' + instance._region_name = 'region_name' + instance._cli_options.data_processing_url = 'url' + instance._interface = 'public' + + plugin.make_client(instance) + p_client.assert_called_with(session='session', + region_name='region_name', + sahara_url='url', + endpoint_type='public') |