def test_get_host_by_identifier_return_host_not_found_when_no_hosts_exist(self): hosts = [] self.svc.client.svcinfo.lshost = Mock() self.svc.client.svcinfo.lshost.return_value = self._get_hosts_list_result(hosts) with self.assertRaises(array_errors.HostNotFoundError): self.svc.get_host_by_host_identifiers(Initiators('Test_iqn', ['Test_wwn']))