Rewrite CLI around action runtime
This commit is contained in:
@@ -57,8 +57,8 @@ class TestPackageService:
|
||||
monkeypatch.setattr(paths, "INSTALLED_STATE", tmp_path / "installed.json")
|
||||
ctx = _make_ctx(tmp_path)
|
||||
svc = PackageService(ctx)
|
||||
svc.remove(["missing"])
|
||||
assert "No matching" in capsys.readouterr().out
|
||||
with pytest.raises(FlowError, match="not installed"):
|
||||
svc.remove(["missing"])
|
||||
|
||||
def test_install_requires_args(self, tmp_path, monkeypatch):
|
||||
monkeypatch.setattr(paths, "INSTALLED_STATE", tmp_path / "installed.json")
|
||||
@@ -106,7 +106,7 @@ class TestPackageService:
|
||||
def read(self):
|
||||
return archive_bytes
|
||||
|
||||
monkeypatch.setattr("flow.services.packages.urllib.request.urlopen", lambda *args, **kwargs: FakeResponse())
|
||||
monkeypatch.setattr("flow.adapters.download.urllib.request.urlopen", lambda *args, **kwargs: FakeResponse())
|
||||
|
||||
manifest = {
|
||||
"packages": [{
|
||||
@@ -176,7 +176,7 @@ class TestPackageService:
|
||||
raise urllib.error.URLError("Network unreachable")
|
||||
|
||||
monkeypatch.setattr(
|
||||
"flow.services.packages.urllib.request.urlopen", _raise,
|
||||
"flow.adapters.download.urllib.request.urlopen", _raise,
|
||||
)
|
||||
|
||||
manifest = {
|
||||
|
||||
Reference in New Issue
Block a user