async def test_mixed_staged_unstaged_changes(
        self,
        mock_run_git,
        mock_status,
        mock_find_repos,
        tool,
    ):
        """Test reviewing both staged and unstaged changes"""
        mock_find_repos.return_value = ["/test/repo"]
        mock_status.return_value = {
            "branch": "develop",
            "ahead": 2,
            "behind": 1,
            "staged_files": ["file1.py"],
            "unstaged_files": ["file2.py"],
        }

        # Mock git commands
        mock_run_git.side_effect = [
            (True, "file1.py\n"),  # staged files
            (True, "diff --git a/file1.py..."),  # diff for file1.py
            (True, "file2.py\n"),  # unstaged files
            (True, "diff --git a/file2.py..."),  # diff for file2.py
        ]

        request = PrecommitRequest(
            path="/absolute/repo/path",
            focus_on="error handling",
            severity_filter="high",
        )
        result = await tool.prepare_prompt(request)

        # Verify all sections are present
        assert "Review Type: full" in result
        assert "Severity Filter: high" in result
        assert "Focus Areas: error handling" in result
        assert "Reviewing: staged and unstaged changes" in result
Test reviewing both staged and unstaged changes
tests/test_precommit.py