def test_failure_after_max_retries(self):
        """Test that function raises exception after max retries."""
        mock_response = MagicMock()
        mock_response.status_code = 503
        func = MagicMock(return_value=(False, mock_response))
        with self.assertRaises(DbtBaseException) as context:
            _retry_with_backoff("operation", func, max_retries=3)
        self.assertIn("Error operation", str(context.exception))
        self.assertEqual(func.call_count, 4)
        # Sleep should be called twice (after first and second attempts)
        self.assertEqual(self.mock_sleep.call_count, 3)
        self.assertEqual(
            self.mock_sleep.call_args_list, [call(1), call(2), call(4)]
        )  # Exponential backoff
Test that function raises exception after max retries.
tests/unit/test_artifact_upload.py