def test_push_changes(monkeypatch):
    captured = {}

    def fake_run_cmd(cmd, cwd=None):
        captured["cmd"] = cmd

    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