docstr: Asserts that a task is completed with success status and check function
docstr_tok: ["Asserts","that","a","task","is","completed","with","success","status","and","check","function"]
code: def test_s3_key_sensor_execute_complete_success_with_keys(
      self, mock_poke
  ):
      """
      Asserts that a task is completed with success status and check function
      """
  
      def check_fn(files: list) -> bool:
          return all(f.get("Size", 0) > 0 for f in files)
  
      sensor = S3KeySensor(
          task_id="s3_key_sensor_async",
          bucket_key="key",
          bucket_name="bucket",
          check_fn=check_fn,
          deferrable=True,
      )
      assert (
          sensor.execute_complete(
              context={},
              event={"status": "running", "files": [{"Size": 10}]},
          )
          is None
      )
  
imports: from __future__ import annotations
  from datetime import datetime
  from unittest import mock
  import pytest
  import time_machine
  from airflow.exceptions import AirflowException, AirflowSkipException
  from airflow.models import DAG, DagRun, TaskInstance
  from airflow.models.variable import Variable
  from airflow.providers.amazon.aws.sensors.s3 import S3KeySensor, S3KeysUnchangedSensor
  from airflow.utils import timezone
label_desc: Use image node_id 14 for calling the TestS3KeySensor obj's underlying member method code with example usage: obj.test_s3_key_sensor_execute_complete_success_with_keys(mock_poke) and returns: all