Fix conflicting test case name
... and fix the wrong format of Sec-WebSocket-Protocol header in test case.
This commit is contained in:
parent
9ffe1493da
commit
e92a6ddf42
|
|
@ -81,7 +81,7 @@ class AcceptTestCase(unittest.TestCase):
|
|||
ws.accept(sock, {'upgrade': 'websocket',
|
||||
'Sec-WebSocket-Version': '13',
|
||||
'Sec-WebSocket-Key': 'DKURYVK9cRFul1vOZVA56Q==',
|
||||
'Sec-WebSocket-Protocol': 'foobar gazonk'})
|
||||
'Sec-WebSocket-Protocol': 'foobar,gazonk'})
|
||||
self.assertEqual(sock.data[:13], b'HTTP/1.1 101 ')
|
||||
self.assertTrue(b'\r\nSec-WebSocket-Protocol: gazonk\r\n' in sock.data)
|
||||
|
||||
|
|
@ -101,9 +101,9 @@ class AcceptTestCase(unittest.TestCase):
|
|||
sock, {'upgrade': 'websocket',
|
||||
'Sec-WebSocket-Version': '13',
|
||||
'Sec-WebSocket-Key': 'DKURYVK9cRFul1vOZVA56Q==',
|
||||
'Sec-WebSocket-Protocol': 'foobar gazonk'})
|
||||
'Sec-WebSocket-Protocol': 'foobar,gazonk'})
|
||||
|
||||
def test_protocol(self):
|
||||
def test_unsupported_protocol(self):
|
||||
class ProtoSocket(websocket.WebSocket):
|
||||
def select_subprotocol(self, protocol):
|
||||
return 'oddball'
|
||||
|
|
@ -114,7 +114,7 @@ class AcceptTestCase(unittest.TestCase):
|
|||
sock, {'upgrade': 'websocket',
|
||||
'Sec-WebSocket-Version': '13',
|
||||
'Sec-WebSocket-Key': 'DKURYVK9cRFul1vOZVA56Q==',
|
||||
'Sec-WebSocket-Protocol': 'foobar gazonk'})
|
||||
'Sec-WebSocket-Protocol': 'foobar,gazonk'})
|
||||
|
||||
class PingPongTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue