Skip to content

Commit

Permalink
Fix typo deffer -> defer (apache#40824)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish authored Jul 16, 2024
1 parent 6af8662 commit 8b1ff21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/sensors/test_time_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ def setup_method(self):
self.dag = DAG(TEST_DAG_ID, default_args=self.args)

@pytest.mark.parametrize(
"should_deffer",
"should_defer",
[False, True],
)
@mock.patch("airflow.models.baseoperator.BaseOperator.defer")
def test_timedelta_sensor(self, defer_mock, should_deffer):
def test_timedelta_sensor(self, defer_mock, should_defer):
delta = timedelta(hours=1)
op = TimeDeltaSensorAsync(task_id="timedelta_sensor_check", delta=delta, dag=self.dag)
if should_deffer:
if should_defer:
data_interval_end = pendulum.now("UTC").add(hours=1)
else:
data_interval_end = pendulum.now("UTC").replace(microsecond=0, second=0, minute=0).add(hours=-1)
op.execute({"data_interval_end": data_interval_end})
if should_deffer:
if should_defer:
defer_mock.assert_called_once()
else:
defer_mock.assert_not_called()

0 comments on commit 8b1ff21

Please sign in to comment.