Skip to content

Commit

Permalink
#28 - Always use square brackets when sending messages, even on ws
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed Mar 16, 2012
1 parent ae12ddf commit f75cc6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sockjs-protocol-dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def test_empty_frame(self):
self.assertEqual(ws.recv(), u'o')
# Server must ignore empty messages.
ws.send(u'')
ws.send(u'"a"')
ws.send(u'["a"]')
self.assertEqual(ws.recv(), u'a["a"]')
ws.close()

Expand Down Expand Up @@ -651,7 +651,7 @@ def test_broken_json(self):
'/000/' + str(uuid.uuid4()) + '/websocket'
ws = websocket.create_connection(ws_url)
self.assertEqual(ws.recv(), u'o')
ws.send(u'"a')
ws.send(u'["a')
with self.assertRaises(websocket.ConnectionClosedException):
if ws.recv() is None:
raise websocket.ConnectionClosedException
Expand All @@ -667,7 +667,7 @@ def test_transport(self):
self.assertEqual(ws.recv(), 'o')
# Server must ignore empty messages.
ws.send(u'')
ws.send(u'"a"')
ws.send(u'["a"]')
self.assertEqual(ws.recv(), 'a["a"]')
ws.close()

Expand Down Expand Up @@ -711,7 +711,7 @@ def test_broken_json(self):
'/000/' + str(uuid.uuid4()) + '/websocket'
ws = WebSocket8Client(ws_url)
self.assertEqual(ws.recv(), u'o')
ws.send(u'"a')
ws.send(u'["a')
with self.assertRaises(ws.ConnectionClosedException):
ws.recv()
ws.close()
Expand Down

0 comments on commit f75cc6a

Please sign in to comment.