def test_request_exception_handling(self):
        """Test that RequestException is caught and retried."""
        import requests

        func = MagicMock(
            side_effect=[requests.RequestException("Network error"), (True, "success")]
        )
        result = _retry_with_backoff("operation", func)
        self.assertEqual(result, "success")
        self.assertEqual(func.call_count, 2)
        self.mock_sleep.assert_called_once_with(1)
Test that RequestException is caught and retried.
tests/unit/test_artifact_upload.py