01-fix-tests.patch 1.0 KB

123456789101112131415161718192021222324
  1. --- contrib/python/websocket-client/websocket/tests/test_http.py (index)
  2. +++ contrib/python/websocket-client/websocket/tests/test_http.py (working tree)
  3. @@ -74,7 +74,8 @@ class HeaderSockMock(SockMock):
  4. def __init__(self, fname):
  5. SockMock.__init__(self)
  6. - path = os.path.join(os.path.dirname(__file__), fname)
  7. + import yatest.common as yc
  8. + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname)
  9. with open(path, "rb") as f:
  10. self.add_packet(f.read())
  11. --- contrib/python/websocket-client/websocket/tests/test_websocket.py (index)
  12. +++ contrib/python/websocket-client/websocket/tests/test_websocket.py (working tree)
  13. @@ -86,7 +86,8 @@ class HeaderSockMock(SockMock):
  14. def __init__(self, fname):
  15. SockMock.__init__(self)
  16. - path = os.path.join(os.path.dirname(__file__), fname)
  17. + import yatest.common as yc
  18. + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname)
  19. with open(path, "rb") as f:
  20. self.add_packet(f.read())