aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/websocket-client/py3/patches/01-fix-tests.patch
blob: db6ba4b667cfa7d42b6ce97d6ae58ec26f2d2ea4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- contrib/python/websocket-client/py3/websocket/tests/test_http.py	(index)
+++ contrib/python/websocket-client/py3/websocket/tests/test_http.py	(working tree)
@@ -74,7 +74,8 @@ class HeaderSockMock(SockMock):
 
     def __init__(self, fname):
         SockMock.__init__(self)
-        path = os.path.join(os.path.dirname(__file__), fname)
+        import yatest.common
+        path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py3/websocket/tests', fname))
         with open(path, "rb") as f:
             self.add_packet(f.read())
 
--- contrib/python/websocket-client/py3/websocket/tests/test_websocket.py	(index)
+++ contrib/python/websocket-client/py3/websocket/tests/test_websocket.py	(working tree)
@@ -86,7 +86,8 @@ class HeaderSockMock(SockMock):
 
     def __init__(self, fname):
         SockMock.__init__(self)
-        path = os.path.join(os.path.dirname(__file__), fname)
+        import yatest.common
+        path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py3/websocket/tests', fname))
         with open(path, "rb") as f:
             self.add_packet(f.read())