From f04d57acbc5ef639c0dc70fde800cf5c24d0b967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= <6774676+eumiro@users.noreply.github.com> Date: Sun, 20 Nov 2022 20:22:48 +0100 Subject: refactor: use is for True/False --- tests/test_streaming.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test_streaming.py') diff --git a/tests/test_streaming.py b/tests/test_streaming.py index fb60fe1..53a71ee 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -20,7 +20,7 @@ close_connections = False def patch_streaming(): global streaming_is_patched global close_connections - if streaming_is_patched == True: + if streaming_is_patched is True: return streaming_is_patched = True @@ -35,7 +35,7 @@ def patch_streaming(): response = real_connection_real_get_response(*args, **kwargs) real_body = b"" try: - while close_connections == False: + while close_connections is False: if len(select.select([response], [], [], 0.01)[0]) > 0: chunk = response.read(1) real_body += chunk @@ -165,7 +165,7 @@ def test_unknown_event(): 'data: {}', '', ]) - assert listener.bla_called == True + assert listener.bla_called is True assert listener.updates == [] assert listener.notifications == [] assert listener.deletes == [] @@ -195,7 +195,7 @@ def test_dotted_unknown_event(): 'data: {}', '', ]) - assert listener.do_something_called == True + assert listener.do_something_called is True assert listener.updates == [] assert listener.notifications == [] assert listener.deletes == [] -- cgit v1.2.3