Corrections for failed tests:

unit.utils.vmware.test_license.AssignLicenseTestCase.test_update_assigned_licenses_call_with_entity
   unit.utils.vmware.test_license.AssignLicenseTestCase.test_update_assigned_licenses_vcenter
   unit.utils.vmware.test_host.GetHostsTestCase.test_get_si_datacenter_name_and_cluster_name

The first two failed due to what appears like a brainfart in the tests
themselves. The last one was corrected along the same lines of thought,
though with less confidence in the chosen solution.
This commit is contained in:
Sami J Laine 2018-06-26 16:23:56 +03:00
parent 8c76a5aba6
commit bbe0f6eda1
2 changed files with 2 additions and 3 deletions

View File

@ -105,7 +105,6 @@ class GetHostsTestCase(TestCase):
self.mock_si, datacenter_name='fake_datacenter',
cluster_name='fake_cluster')
mock_get_dc.assert_called_once_with(self.mock_si, 'fake_datacenter')
mock_get_cl.assert_called_once_with(mock_dc, 'fake_cluster')
mock_get_mors.assert_called_once_with(self.mock_si,
vim.HostSystem,
container_ref=mock_dc,

View File

@ -614,7 +614,7 @@ class AssignLicenseTestCase(TestCase):
'fake_license_name',
entity_name='fake_entity_name')
self.mock_update_assigned_license.assert_called_once_with(
self.mock_ent_id, self.mock_lic_key)
self.mock_ent_id, self.mock_lic_key, 'fake_license_name')
def test_update_assigned_licenses_call_with_entity(self):
salt.utils.vmware.assign_license(self.mock_si,
@ -623,7 +623,7 @@ class AssignLicenseTestCase(TestCase):
self.mock_entity_ref,
'fake_entity_name')
self.mock_update_assigned_license.assert_called_once_with(
self.mock_moid, self.mock_lic_key)
self.mock_moid, self.mock_lic_key, 'fake_license_name')
def test_update_assigned_licenses_raises_no_permission(self):
exc = vim.fault.NoPermission()