test: Mock secret loading in test_push_changes to avoid failures
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s

This commit is contained in:
Jon Michael Aanes (aider) 2025-04-13 16:10:13 +02:00 committed by Jmaa
parent d3d9a1b3fe
commit 5a899c05fb

View File

@ -4,6 +4,7 @@ def test_push_changes(monkeypatch):
def fake_run_cmd(cmd, cwd=None):
captured["cmd"] = cmd
monkeypatch.setattr("aider_gitea.__main__.SECRETS.load_or_fail", lambda x: "mocked_secret")
monkeypatch.setattr("aider_gitea.__main__.run_cmd", fake_run_cmd)
monkeypatch.setattr("aider_gitea.__main__.SECRETS.load_or_fail", lambda x: "mocked_secret")