MINOR: fix qlikcloud test connection (#17459)

* fix: qlikcloud test connection

* patch test_connection for qlik cloud unit tests
This commit is contained in:
Imri Paran 2024-08-20 08:14:09 +02:00 committed by GitHub
parent ddd8c41864
commit 31c2ec8c57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -145,7 +145,7 @@ class QlikCloudClient:
resp_apps = self.client.get("/v1/items?resourceType=app")
if resp_apps:
resp = QlikAppResponse(**resp_apps)
yield from resp.apps
return list(resp.apps)
def get_dashboard_details(self, dashboard_id: str) -> Optional[QlikApp]:
"""

View File

@ -157,7 +157,11 @@ class QlikCloudUnitTest(TestCase):
"""
def __init__(self, methodName) -> None:
with patch.object(QlikCloudClient, "get_dashboards_list", return_value=None):
with patch.object(
QlikCloudClient, "get_dashboards_list", return_value=None
), patch.object(
QlikCloudClient, "get_dashboards_list_test_conn", return_value=None
):
super().__init__(methodName)
# test_connection.return_value = False
self.config = OpenMetadataWorkflowConfig.model_validate(