def test_get_changed_files(self):
        """Test that _get_changed_files returns the list of changed files."""
        # Let's create a new file to ensure it shows up in the diff
        with open(os.path.join(self.local_dir, 'new_file.txt'), 'w') as f:
            f.write('New file content')
        self._execute_command('git --no-pager add new_file.txt', self.local_dir)

        files = self.git_handler._get_changed_files()
        self.assertTrue(files)

        # Should include file1.txt (modified) and file3.txt (deleted)
        file_paths = [line.split('\t')[-1] for line in files if '\t' in line]
        self.assertIn('file1.txt', file_paths)
        self.assertIn('file3.txt', file_paths)
        # Also check for the new file
        self.assertIn('new_file.txt', file_paths)

        # Should have called _get_valid_ref and then git diff
        diff_commands = [
            cmd
            for cmd, _ in self.executed_commands
            if cmd.startswith('git --no-pager diff')
        ]
        self.assertTrue(diff_commands)
Test that _get_changed_files returns the list of changed files.
tests/unit/test_git_handler.py