Merge "Fix misuse of assertTrue"

This commit is contained in:
Zuul 2022-09-13 12:39:54 +00:00 committed by Gerrit Code Review
commit 972d5867d2
2 changed files with 4 additions and 3 deletions

View File

@ -270,7 +270,7 @@ class HostFiltersTestCase(test.TestCase):
}
host = fakes.FakeHostState('host1',
{'capabilities': {'enabled': True}})
self.assertTrue(self.filter.host_passes, (host, filter_properties))
self.assertTrue(self.filter.host_passes(host, filter_properties))
def test_json_filter_empty_filters_pass(self):
host = fakes.FakeHostState('host1',

View File

@ -152,9 +152,10 @@ class NetAppFileStorageLibraryTestCase(test.TestCase):
mock_set_cluster_info.assert_called_once()
def test_set_cluster_info(self):
self.library._client.is_nve_supported.return_value = True
self.library._client.features.FLEXVOL_ENCRYPTION = True
self.library._set_cluster_info()
self.assertTrue(self.library._cluster_info['nve_support'],
fake.CLUSTER_NODES)
self.assertTrue(self.library._cluster_info['nve_support'])
def test_check_for_setup_error(self):
mock_start_periodic_tasks = self.mock_object(self.library,