|
1 | 1 | import subprocess |
2 | | -from pathlib import Path |
3 | 2 | from unittest.mock import patch |
4 | 3 |
|
5 | 4 | import pytest |
@@ -39,11 +38,8 @@ def test_shows_login_message_when_not_logged_in(logged_out_cli: None) -> None: |
39 | 38 | assert "No credentials found" in result.output |
40 | 39 |
|
41 | 40 |
|
42 | | -def test_shows_error_when_app_not_configured( |
43 | | - logged_in_cli: None, tmp_path: Path |
44 | | -) -> None: |
45 | | - with changing_dir(tmp_path): |
46 | | - result = runner.invoke(app, ["setup-ci"]) |
| 41 | +def test_shows_message_if_app_not_configured(logged_in_cli: None) -> None: |
| 42 | + result = runner.invoke(app, ["setup-ci"]) |
47 | 43 |
|
48 | 44 | assert result.exit_code == 1 |
49 | 45 | assert "No app linked to this directory" in result.output |
@@ -360,11 +356,9 @@ def test_creates_token_sets_secrets_and_writes_workflow( |
360 | 356 | assert "Done" in result.output |
361 | 357 | assert "2027-02-18" in result.output |
362 | 358 |
|
363 | | - # Verify secrets were set |
364 | 359 | mock_secret.assert_any_call("FASTAPI_CLOUD_TOKEN", "test-token-value") |
365 | 360 | mock_secret.assert_any_call("FASTAPI_CLOUD_APP_ID", app_id) |
366 | 361 |
|
367 | | - # Verify workflow file was written with correct content |
368 | 362 | workflow_file = configured_app.path / ".github" / "workflows" / "deploy.yml" |
369 | 363 | assert workflow_file.exists() |
370 | 364 | content = workflow_file.read_text() |
|
0 commit comments