Skip to content

Commit

Permalink
test(providers/microsoft): fix test_execute_failure_in_deferrable_mod…
Browse files Browse the repository at this point in the history
…e_with_soft_fail expected exception
  • Loading branch information
Lee-W committed Aug 31, 2023
1 parent 5f3321b commit 9eec324
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/providers/amazon/aws/sensors/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import pytest

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


Expand Down

0 comments on commit 9eec324

Please sign in to comment.