GRM-58: refactor: require tea CLI everywhere, fail on missing Vikunja task
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
import click
|
||||
import pytest
|
||||
from click.testing import CliRunner
|
||||
|
||||
@@ -81,10 +82,12 @@ class TestVerify:
|
||||
|
||||
|
||||
class TestConfigureTeaLogin:
|
||||
def test_tea_not_installed(self) -> None:
|
||||
def test_tea_not_installed_raises(self) -> None:
|
||||
"""tea must be installed — setup fails if it's missing."""
|
||||
with patch("shutil.which", return_value=None):
|
||||
with patch.dict("os.environ", {"REPO_TOKEN": "tok"}, clear=True):
|
||||
setup._configure_tea_login()
|
||||
with pytest.raises(click.ClickException, match="not installed"):
|
||||
setup._configure_tea_login()
|
||||
|
||||
def test_no_repo_token(self) -> None:
|
||||
with patch("shutil.which", return_value="/usr/bin/tea"):
|
||||
|
||||
Reference in New Issue
Block a user