~ubuntu-branches/ubuntu/trusty/websockify/trusty-updates

« back to all changes in this revision

Viewing changes to tests/utf8-list.py

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2013-05-30 16:00:31 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130530160031-r6xzccav3emxor4y
Tags: 0.5.1+dfsg1-1
* New upstream release.
* Ran wrap-and-sort.
* Do not install include/web-socket-js/WebSocketMain.swf in setup.py
  (patches setup.py).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import sys, os, socket, ssl, time, traceback
7
7
from select import select
8
8
 
9
 
sys.path.insert(0,os.path.dirname(__file__) + "/../")
 
9
sys.path.insert(0,os.path.dirname(__file__) + "/../websockify")
10
10
from websocket import WebSocketServer
11
11
 
12
12
if __name__ == '__main__':
13
 
    print "val: hixie | hybi_base64 | hybi_binary"
 
13
    print "val: hybi_base64 | hybi_binary"
14
14
    for c in range(0, 256):
15
 
        hixie = WebSocketServer.encode_hixie(chr(c))
16
15
        hybi_base64 = WebSocketServer.encode_hybi(chr(c), opcode=1,
17
16
                base64=True)
18
17
        hybi_binary = WebSocketServer.encode_hybi(chr(c), opcode=2,
19
18
                base64=False)
20
 
        print "%d: %s | %s | %s" % (c, repr(hixie), repr(hybi_base64),
21
 
                repr(hybi_binary))
 
19
        print "%d: %s | %s" % (c, repr(hybi_base64), repr(hybi_binary))
22
20