Skip to content

Commit 33c97ef

Browse files
committed
Unit test fix
1 parent fc8a5ae commit 33c97ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/tests_app/cli/test_cmd_show_cluster_logs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from unittest import mock
2+
from unittest.mock import MagicMock
23

34
from click.testing import CliRunner
45
from lightning_cloud.openapi import Externalv1Cluster
@@ -7,9 +8,10 @@
78
from lightning_app.cli.lightning_cli import cluster_logs
89

910

11+
@mock.patch("lightning_app.cli.lightning_cli.LightningClient", MagicMock())
12+
@mock.patch("lightning_app.utilities.network.LightningClient", MagicMock())
1013
@mock.patch("lightning_app.cli.lightning_cli.AWSClusterManager.get_clusters")
11-
@mock.patch("lightning_app.cli.lightning_cli.LightningClient")
12-
def test_show_logs_errors(client, get_clusters):
14+
def test_show_logs_errors(get_clusters):
1315
"""Test that the CLI prints the errors for the show logs command."""
1416

1517
runner = CliRunner()

0 commit comments

Comments
 (0)