diff options
Diffstat (limited to 'saharaclient/tests/unit/osc/v1')
5 files changed, 13 insertions, 43 deletions
diff --git a/saharaclient/tests/unit/osc/v1/test_cluster_templates.py b/saharaclient/tests/unit/osc/v1/test_cluster_templates.py index 1580dce..d98e89b 100644 --- a/saharaclient/tests/unit/osc/v1/test_cluster_templates.py +++ b/saharaclient/tests/unit/osc/v1/test_cluster_templates.py @@ -273,10 +273,7 @@ class TestUpdateClusterTemplate(TestClusterTemplates): self.cmd.take_action(parsed_args) self.ct_mock.update.assert_called_once_with( - '0647061f-ab98-4c89-84e0-30738ea55750', cluster_configs=None, - description=None, hadoop_version=None, is_protected=None, - is_public=None, name=None, node_groups=None, plugin_name=None, - shares=None, use_autoconfig=None) + '0647061f-ab98-4c89-84e0-30738ea55750') def test_ct_update_all_options(self): arglist = ['template', '--name', 'template', '--node-groups', @@ -302,8 +299,7 @@ class TestUpdateClusterTemplate(TestClusterTemplates): {'count': 2, 'name': 'fakeng', 'node_group_template_id': 'd29631fc-0fad-434b-80aa-7a3e9526f57c'}], - plugin_name='fake', use_autoconfig=True, shares=None, - cluster_configs=None) + plugin_name='fake', use_autoconfig=True) # Check that columns are correct expected_columns = ('Anti affinity', 'Description', 'Id', 'Is default', @@ -327,7 +323,5 @@ class TestUpdateClusterTemplate(TestClusterTemplates): self.cmd.take_action(parsed_args) self.ct_mock.update.assert_called_once_with( - '0647061f-ab98-4c89-84e0-30738ea55750', cluster_configs=None, - description=None, hadoop_version=None, is_protected=False, - is_public=False, name=None, node_groups=None, plugin_name=None, - shares=None, use_autoconfig=None) + '0647061f-ab98-4c89-84e0-30738ea55750', is_protected=False, + is_public=False) diff --git a/saharaclient/tests/unit/osc/v1/test_clusters.py b/saharaclient/tests/unit/osc/v1/test_clusters.py index ba48993..1bc0dd3 100644 --- a/saharaclient/tests/unit/osc/v1/test_clusters.py +++ b/saharaclient/tests/unit/osc/v1/test_clusters.py @@ -376,9 +376,7 @@ class TestUpdateCluster(TestClusters): self.cmd.take_action(parsed_args) # Check that correct arguments were passed - self.cl_mock.update.assert_called_once_with( - 'cluster_id', description=None, is_protected=None, is_public=None, - name=None, shares=None) + self.cl_mock.update.assert_called_once_with('cluster_id') def test_cluster_update_all_options(self): arglist = ['fake', '--name', 'fake', '--description', 'descr', @@ -395,7 +393,7 @@ class TestUpdateCluster(TestClusters): # Check that correct arguments were passed self.cl_mock.update.assert_called_once_with( 'cluster_id', description='descr', is_protected=True, - is_public=True, name='fake', shares=None) + is_public=True, name='fake') # Check that columns are correct expected_columns = ('Anti affinity', 'Cluster template id', @@ -425,8 +423,7 @@ class TestUpdateCluster(TestClusters): # Check that correct arguments were passed self.cl_mock.update.assert_called_once_with( - 'cluster_id', description=None, is_protected=False, - is_public=False, name=None, shares=None) + 'cluster_id', is_protected=False, is_public=False) class TestScaleCluster(TestClusters): diff --git a/saharaclient/tests/unit/osc/v1/test_job_templates.py b/saharaclient/tests/unit/osc/v1/test_job_templates.py index 69f83cb..dc6bb23 100644 --- a/saharaclient/tests/unit/osc/v1/test_job_templates.py +++ b/saharaclient/tests/unit/osc/v1/test_job_templates.py @@ -246,9 +246,7 @@ class TestUpdateJobTemplate(TestJobTemplates): self.cmd.take_action(parsed_args) # Check that correct arguments were passed - self.job_mock.update.assert_called_once_with( - 'job_id', description=None, is_protected=None, is_public=None, - name=None) + self.job_mock.update.assert_called_once_with('job_id') def test_job_template_update_all_options(self): arglist = ['pig-job', '--name', 'pig-job', '--description', 'descr', @@ -289,5 +287,4 @@ class TestUpdateJobTemplate(TestJobTemplates): # Check that correct arguments were passed self.job_mock.update.assert_called_once_with( - 'job_id', description=None, is_protected=False, is_public=False, - name=None) + 'job_id', is_protected=False, is_public=False) diff --git a/saharaclient/tests/unit/osc/v1/test_jobs.py b/saharaclient/tests/unit/osc/v1/test_jobs.py index f907a8e..7a97737 100644 --- a/saharaclient/tests/unit/osc/v1/test_jobs.py +++ b/saharaclient/tests/unit/osc/v1/test_jobs.py @@ -278,8 +278,7 @@ class TestUpdateJob(TestJobs): self.cmd.take_action(parsed_args) # Check that correct arguments were passed - self.je_mock.update.assert_called_once_with( - 'job_id', is_protected=None, is_public=None) + self.je_mock.update.assert_called_once_with('job_id') def test_job_update_public_protected(self): arglist = ['job_id', '--public', '--protected'] diff --git a/saharaclient/tests/unit/osc/v1/test_node_group_templates.py b/saharaclient/tests/unit/osc/v1/test_node_group_templates.py index 8e91010..c67dcc0 100644 --- a/saharaclient/tests/unit/osc/v1/test_node_group_templates.py +++ b/saharaclient/tests/unit/osc/v1/test_node_group_templates.py @@ -320,16 +320,7 @@ class TestUpdateNodeGroupTemplate(TestNodeGroupTemplates): self.cmd.take_action(parsed_args) # Check that correct arguments were passed - self.ngt_mock.update.assert_called_once_with( - 'ng_id', auto_security_group=None, - availability_zone=None, description=None, flavor_id=None, - floating_ip_pool=None, hadoop_version=None, is_protected=None, - is_proxy_gateway=None, is_public=None, name=None, - node_configs=None, node_processes=None, plugin_name=None, - security_groups=None, shares=None, use_autoconfig=None, - volume_local_to_instance=None, volume_type=None, - volumes_availability_zone=None, volumes_per_node=None, - volumes_size=None) + self.ngt_mock.update.assert_called_once_with('ng_id') def test_ngt_update_all_options(self): arglist = ['template', '--name', 'template', '--plugin', 'fake', @@ -378,7 +369,7 @@ class TestUpdateNodeGroupTemplate(TestNodeGroupTemplates): plugin_name='fake', security_groups=['secgr'], use_autoconfig=True, volume_local_to_instance=True, volume_type='type', volumes_availability_zone='vavzone', volumes_per_node=2, - volumes_size=2, shares=None, node_configs=None) + volumes_size=2) # Check that columns are correct expected_columns = ( @@ -410,12 +401,4 @@ class TestUpdateNodeGroupTemplate(TestNodeGroupTemplates): # Check that correct arguments were passed self.ngt_mock.update.assert_called_once_with( - 'ng_id', auto_security_group=None, - availability_zone=None, description=None, flavor_id=None, - floating_ip_pool=None, hadoop_version=None, is_protected=False, - is_proxy_gateway=None, is_public=False, name=None, - node_configs=None, node_processes=None, plugin_name=None, - security_groups=None, shares=None, use_autoconfig=None, - volume_local_to_instance=None, volume_type=None, - volumes_availability_zone=None, volumes_per_node=None, - volumes_size=None) + 'ng_id', is_protected=False, is_public=False) |