Skip to content

Commit 9eec324

Browse files
committed
test(providers/microsoft): fix test_execute_failure_in_deferrable_mode_with_soft_fail expected exception
1 parent 5f3321b commit 9eec324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/providers/amazon/aws/sensors/test_batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import pytest
2222

23-
from airflow.exceptions import AirflowException, TaskDeferred
23+
from airflow.exceptions import AirflowException, AirflowSkipException, TaskDeferred
2424
from airflow.providers.amazon.aws.hooks.batch_client import BatchClientHook
2525
from airflow.providers.amazon.aws.sensors.batch import (
2626
BatchComputeEnvironmentSensor,
@@ -103,7 +103,7 @@ def test_execute_failure_in_deferrable_mode(self, deferrable_batch_sensor: Batch
103103
def test_execute_failure_in_deferrable_mode_with_soft_fail(self, deferrable_batch_sensor: BatchSensor):
104104
"""Tests that an AirflowSkipException is raised in case of error event and soft_fail is set to True"""
105105
deferrable_batch_sensor.soft_fail = True
106-
with pytest.raises(AirflowException):
106+
with pytest.raises(AirflowSkipException):
107107
deferrable_batch_sensor.execute_complete(context={}, event={"status": "failure"})
108108

109109

0 commit comments

Comments
 (0)