diff options
Diffstat (limited to 'tests/test_streaming.py')
-rw-r--r-- | tests/test_streaming.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 | |||
20 | def patch_streaming(): | 20 | def patch_streaming(): |
21 | global streaming_is_patched | 21 | global streaming_is_patched |
22 | global close_connections | 22 | global close_connections |
23 | if streaming_is_patched == True: | 23 | if streaming_is_patched is True: |
24 | return | 24 | return |
25 | streaming_is_patched = True | 25 | streaming_is_patched = True |
26 | 26 | ||
@@ -35,7 +35,7 @@ def patch_streaming(): | |||
35 | response = real_connection_real_get_response(*args, **kwargs) | 35 | response = real_connection_real_get_response(*args, **kwargs) |
36 | real_body = b"" | 36 | real_body = b"" |
37 | try: | 37 | try: |
38 | while close_connections == False: | 38 | while close_connections is False: |
39 | if len(select.select([response], [], [], 0.01)[0]) > 0: | 39 | if len(select.select([response], [], [], 0.01)[0]) > 0: |
40 | chunk = response.read(1) | 40 | chunk = response.read(1) |
41 | real_body += chunk | 41 | real_body += chunk |
@@ -165,7 +165,7 @@ def test_unknown_event(): | |||
165 | 'data: {}', | 165 | 'data: {}', |
166 | '', | 166 | '', |
167 | ]) | 167 | ]) |
168 | assert listener.bla_called == True | 168 | assert listener.bla_called is True |
169 | assert listener.updates == [] | 169 | assert listener.updates == [] |
170 | assert listener.notifications == [] | 170 | assert listener.notifications == [] |
171 | assert listener.deletes == [] | 171 | assert listener.deletes == [] |
@@ -195,7 +195,7 @@ def test_dotted_unknown_event(): | |||
195 | 'data: {}', | 195 | 'data: {}', |
196 | '', | 196 | '', |
197 | ]) | 197 | ]) |
198 | assert listener.do_something_called == True | 198 | assert listener.do_something_called is True |
199 | assert listener.updates == [] | 199 | assert listener.updates == [] |
200 | assert listener.notifications == [] | 200 | assert listener.notifications == [] |
201 | assert listener.deletes == [] | 201 | assert listener.deletes == [] |