Skip to content

Commit

Permalink
[Fix] Code review issue
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Huang <[email protected]>
  • Loading branch information
kentwelcome committed Dec 13, 2024
1 parent e3e5c62 commit 2be7e14
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from click.testing import CliRunner

from recce.cli import server as cli_command_server
from recce.cli import server as cli_command_server, run as cli_command_run
from recce.core import RecceContext
from recce.state import RecceStateLoader

Expand Down Expand Up @@ -66,11 +66,9 @@ def setUp(self):
pass

@patch.object(RecceContext, 'verify_required_artifacts')
@patch('recce.cli.asyncio.run')
def test_cmd_run(self, mock_asyncio_run, mock_verify_required_artifacts):
from recce.cli import run

@patch('recce.cli.cli_run')
def test_cmd_run(self, mock_cli_run, mock_verify_required_artifacts):
mock_verify_required_artifacts.return_value = True, None

self.runner.invoke(run, [])
mock_asyncio_run.assert_called_once()
self.runner.invoke(cli_command_run, [])
mock_cli_run.assert_called_once()

0 comments on commit 2be7e14

Please sign in to comment.