code: def test_poke_true(self):
      sensor = RedisPubSubSensor(
          task_id="test_task",
          dag=self.dag,
          channels="test",
          redis_conn_id="redis_default",
      )
  
      hook = RedisHook(redis_conn_id="redis_default")
      redis = hook.get_conn()
  
      result = sensor.poke(self.mock_context)
      assert not result
      redis.publish("test", "message")
  
      for _ in range(1, 10):
          result = sensor.poke(self.mock_context)
          if result:
              break
          sleep(0.1)
      assert result
      context_calls = [
          call.xcom_push(
              key="message",
              value={
                  "type": "message",
                  "pattern": None,
                  "channel": b"test",
                  "data": b"message",
              },
          )
      ]
      assert (
          self.mock_context["ti"].method_calls == context_calls
      ), "context calls should be same"
      result = sensor.poke(self.mock_context)
      assert not result
  
file_path: airflow/tests/integration/providers/redis/sensors/test_redis_pub_sub.py
imports: from __future__ import annotations
  from time import sleep
  from unittest.mock import MagicMock, call
  import pytest
  from airflow.models.dag import DAG
  from airflow.providers.redis.hooks.redis import RedisHook
  from airflow.providers.redis.sensors.redis_pub_sub import RedisPubSubSensor
  from airflow.utils import timezone
label_desc: Use image node_id 2 for calling the TestRedisPubSubSensor obj's underlying member method code with example usage: obj.test_poke_true() without return types