Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Disiok committed Oct 12, 2024
1 parent c5e2e33 commit 60acc36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/cli/test_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def test_deploy(runner: CliRunner, data_path: Path) -> None:
test_config_file = data_path / "deployment.yaml"
mocked_response = mock.MagicMock(status_code=200, json=lambda: {})
with mock.patch("llama_deploy.cli.deploy.request") as mocked_httpx:
with mock.patch("llama_deploy.cli.utils.request") as mocked_httpx:
mocked_httpx.return_value = mocked_response
result = runner.invoke(llamactl, ["-t", "5.0", "deploy", str(test_config_file)])

Expand All @@ -29,7 +29,7 @@ def test_deploy_failed(runner: CliRunner, data_path: Path) -> None:
mocked_response = mock.MagicMock(
status_code=401, json=lambda: {"detail": "Unauthorized!"}
)
with mock.patch("llama_deploy.cli.deploy.request") as mocked_httpx:
with mock.patch("llama_deploy.cli.utils.request") as mocked_httpx:
mocked_httpx.return_value = mocked_response
result = runner.invoke(llamactl, ["deploy", str(test_config_file)])
assert result.exit_code == 1
Expand Down
6 changes: 3 additions & 3 deletions tests/cli/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_status_server_down(runner: CliRunner) -> None:

def test_status_unhealthy(runner: CliRunner) -> None:
mocked_response = mock.MagicMock(status_code=500)
with mock.patch("llama_deploy.cli.status.request") as mocked_httpx:
with mock.patch("llama_deploy.cli.utils.request") as mocked_httpx:
mocked_httpx.return_value = mocked_response
result = runner.invoke(llamactl, ["status"])
assert result.exit_code == 0
Expand All @@ -23,7 +23,7 @@ def test_status_unhealthy(runner: CliRunner) -> None:

def test_status(runner: CliRunner) -> None:
mocked_response = mock.MagicMock(status_code=200, json=lambda: {})
with mock.patch("llama_deploy.cli.status.request") as mocked_httpx:
with mock.patch("llama_deploy.cli.utils.request") as mocked_httpx:
mocked_httpx.return_value = mocked_response
result = runner.invoke(llamactl, ["status"])
assert result.exit_code == 0
Expand All @@ -36,7 +36,7 @@ def test_status(runner: CliRunner) -> None:
def test_status_with_deployments(runner: CliRunner) -> None:
mocked_response = mock.MagicMock(status_code=200)
mocked_response.json.return_value = {"deployments": ["foo", "bar"]}
with mock.patch("llama_deploy.cli.status.request") as mocked_httpx:
with mock.patch("llama_deploy.cli.utils.request") as mocked_httpx:
mocked_httpx.return_value = mocked_response
result = runner.invoke(llamactl, ["status"])
assert result.exit_code == 0
Expand Down

0 comments on commit 60acc36

Please sign in to comment.