diff --git a/pubnub/pubnub_asyncio.py b/pubnub/pubnub_asyncio.py index 4771c613..2822023e 100644 --- a/pubnub/pubnub_asyncio.py +++ b/pubnub/pubnub_asyncio.py @@ -742,7 +742,6 @@ def __init__(self): self.error_queue = Queue() def status(self, pubnub, status): - # DEBUG print(f"\033[92m\n\nstatus:\n{status.__dict__}\n\n\033[0m") if utils.is_subscribed_event(status) and not self.connected_event.is_set(): self.connected_event.set() elif utils.is_unsubscribed_event(status) and not self.disconnected_event.is_set(): diff --git a/tests/integrational/asyncio/test_heartbeat.py b/tests/integrational/asyncio/test_heartbeat.py index 48eda615..6e720d29 100644 --- a/tests/integrational/asyncio/test_heartbeat.py +++ b/tests/integrational/asyncio/test_heartbeat.py @@ -5,22 +5,23 @@ import pubnub as pn from pubnub.pubnub_asyncio import AsyncioSubscriptionManager, PubNubAsyncio, SubscribeListener from tests import helper -from tests.helper import pnconf_env_copy +from tests.helper import pnconf_sub_copy pn.set_stream_logger('pubnub', logging.DEBUG) +messenger_config = pnconf_sub_copy() +messenger_config.set_presence_timeout(8) +messenger_config.uuid = helper.gen_channel("messenger") + +listener_config = pnconf_sub_copy() +listener_config.uuid = helper.gen_channel("listener") + + @pytest.mark.asyncio async def test_timeout_event_on_broken_heartbeat(event_loop): ch = helper.gen_channel("heartbeat-test") - messenger_config = pnconf_env_copy(uuid=helper.gen_channel('messenger'), enable_subscribe=True, - suppress_leave_events=True) - messenger_config.set_presence_timeout(8) - - listener_config = pnconf_env_copy(uuid=helper.gen_channel('messenger'), enable_subscribe=True, - suppress_leave_events=True) - pubnub = PubNubAsyncio(messenger_config, custom_event_loop=event_loop) pubnub_listener = PubNubAsyncio(listener_config, custom_event_loop=event_loop) diff --git a/tests/integrational/native_threads/test_subscribe.py b/tests/integrational/native_threads/test_subscribe.py index b1c57a10..f23c6262 100644 --- a/tests/integrational/native_threads/test_subscribe.py +++ b/tests/integrational/native_threads/test_subscribe.py @@ -21,7 +21,7 @@ class TestPubNubSubscription(unittest.TestCase): filter_query_parameters=['seqn', 'pnsdk', 'tr', 'tt'], serializer='pn_json', allow_playback_repeats=True) def test_subscribe_unsubscribe(self): - pubnub = PubNub(pnconf_env_copy(enable_subscribe=True, daemon=True, suppress_leave_events=True)) + pubnub = PubNub(pnconf_env_copy(enable_subscribe=True, daemon=True)) ch = "test-subscribe-sub-unsub" try: