- change test cod directory/
This commit is contained in:
liris 2014-03-18 09:16:39 +09:00
parent a0e0d5f966
commit 4900b04f43
5 changed files with 10 additions and 3 deletions

@ -25,5 +25,7 @@ setup(
],
keywords='websockets',
py_modules=["websocket"],
scripts=["bin/wsdump.py"]
scripts=["bin/wsdump.py"],
packages=["tests"],
package_data={'tests': ['data/*.txt']},
)

0
tests/__init__.py Normal file

@ -1,6 +1,10 @@
# -*- coding: utf-8 -*-
#
import sys
sys.path[0:0] = [""]
import os.path
import base64
import socket
try:
@ -24,7 +28,7 @@ import websocket as ws
# "RFC6455: 5.4. Fragmentation"
#
TEST_FRAGMENTATION = True
TEST_WITH_INTERNET = False
TEST_WITH_INTERNET = True
TRACABLE = False
@ -59,7 +63,8 @@ class HeaderSockMock(SockMock):
def __init__(self, fname):
SockMock.__init__(self)
self.add_packet(open(fname).read())
path = os.path.join(os.path.dirname(__file__), fname)
self.add_packet(open(path).read())
class WebSocketTest(unittest.TestCase):