diff --git a/tests/echo.py b/tests/echo.py index d79553e..1d46d50 100755 --- a/tests/echo.py +++ b/tests/echo.py @@ -11,8 +11,8 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates ''' import os, sys, select, optparse -sys.path.insert(0,os.path.dirname(__file__) + "/../websockify") -from websocket import WebSocketServer +sys.path.insert(0,os.path.join(os.path.dirname(__file__), "..")) +from websockify.websocket import WebSocketServer class WebSocketEcho(WebSocketServer): """ diff --git a/tests/load.py b/tests/load.py index 0da7265..e1354c9 100755 --- a/tests/load.py +++ b/tests/load.py @@ -7,8 +7,8 @@ given a sequence number. Any errors are reported and counted. ''' import sys, os, select, random, time, optparse -sys.path.insert(0,os.path.dirname(__file__) + "/../websockify") -from websocket import WebSocketServer +sys.path.insert(0,os.path.join(os.path.dirname(__file__), "..")) +from websockify.websocket import WebSocketServer class WebSocketLoad(WebSocketServer): diff --git a/tests/utf8-list.py b/tests/utf8-list.py index 60a8ae7..77bd430 100755 --- a/tests/utf8-list.py +++ b/tests/utf8-list.py @@ -5,9 +5,8 @@ Display UTF-8 encoding for 0-255.''' import sys, os, socket, ssl, time, traceback from select import select - -sys.path.insert(0,os.path.dirname(__file__) + "/../websockify") -from websocket import WebSocketServer +sys.path.insert(0,os.path.join(os.path.dirname(__file__), "..")) +from websockify.websocket import WebSocketServer if __name__ == '__main__': print "val: hybi_base64 | hybi_binary"