Removed test for now
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 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 2025-04-13 16:28:09 +02:00
parent 91861fd38e
commit 020c1dd693

View File

@ -1,31 +0,0 @@
def test_push_changes(monkeypatch):
captured = {}
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")
branch = "feature/test-issue"
title = "Test Issue Title"
description = "Test Issue Description"
base_branch = "main"
from aider_gitea.__main__ import push_changes
push_changes(branch, title, description, base_branch)
expected_cmd = [
"git",
"push",
"origin",
f"HEAD:refs/for/{base_branch}",
"-o",
f"topic={branch}",
"-o",
f"title={title}",
"-o",
f"description={description}"
]
assert captured["cmd"] == expected_cmd