flake8
This commit is contained in:
parent
2320d73f2a
commit
8e6ca3fb1e
@ -28,6 +28,8 @@ from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
# A logging handler for Trollius that prints everything out
|
||||
class PrintHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
print(record)
|
||||
|
@ -102,11 +102,11 @@ class WebSocketProtocolTests(unittest.TestCase):
|
||||
"""
|
||||
sendClose with a too-long reason will truncate it.
|
||||
"""
|
||||
self.protocol.sendClose(code=1000, reason="abc"*1000)
|
||||
self.protocol.sendClose(code=1000, reason="abc" * 1000)
|
||||
|
||||
# We closed properly
|
||||
self.assertEqual(self.transport._written[2:],
|
||||
b"\x03\xe8" + (b"abc"*40) + b"...")
|
||||
b"\x03\xe8" + (b"abc" * 40) + b"...")
|
||||
self.assertEqual(self.protocol.state, self.protocol.STATE_CLOSING)
|
||||
|
||||
def test_sendClose_reason_with_no_code(self):
|
||||
|
Loading…
Reference in New Issue
Block a user