mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Bump websocket-client from 1.2.3 to 1.3.2 (#1700)
* Bump websocket-client from 1.2.3 to 1.3.2 Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.2.3 to 1.3.2. - [Release notes](https://github.com/websocket-client/websocket-client/releases) - [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog) - [Commits](https://github.com/websocket-client/websocket-client/compare/v1.2.3...v1.3.2) --- updated-dependencies: - dependency-name: websocket-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update websocket-client==1.3.2 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
67baf9a260
commit
d510e0f600
22 changed files with 251 additions and 205 deletions
|
@ -1,14 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
"""
|
||||
|
||||
"""
|
||||
import os
|
||||
import os.path
|
||||
import socket
|
||||
import websocket as ws
|
||||
import unittest
|
||||
from websocket._handshake import _create_sec_websocket_key, \
|
||||
_validate as _validate_header
|
||||
from websocket._http import read_headers
|
||||
from websocket._utils import validate_utf8
|
||||
from base64 import decodebytes as base64decode
|
||||
|
||||
"""
|
||||
test_websocket.py
|
||||
websocket - WebSocket client library for Python
|
||||
|
||||
Copyright 2021 engn33r
|
||||
Copyright 2022 engn33r
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -23,18 +30,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import socket
|
||||
import websocket as ws
|
||||
from websocket._handshake import _create_sec_websocket_key, \
|
||||
_validate as _validate_header
|
||||
from websocket._http import read_headers
|
||||
from websocket._utils import validate_utf8
|
||||
from base64 import decodebytes as base64decode
|
||||
|
||||
import unittest
|
||||
|
||||
try:
|
||||
import ssl
|
||||
from ssl import SSLError
|
||||
|
@ -201,14 +196,16 @@ class WebSocketTest(unittest.TestCase):
|
|||
@unittest.skipUnless(TEST_WITH_INTERNET, "Internet-requiring tests are disabled")
|
||||
def testIter(self):
|
||||
count = 2
|
||||
for _ in ws.create_connection('wss://stream.meetup.com/2/rsvps'):
|
||||
s = ws.create_connection('wss://api.bitfinex.com/ws/2')
|
||||
s.send('{"event": "subscribe", "channel": "ticker"}')
|
||||
for _ in s:
|
||||
count -= 1
|
||||
if count == 0:
|
||||
break
|
||||
|
||||
@unittest.skipUnless(TEST_WITH_INTERNET, "Internet-requiring tests are disabled")
|
||||
def testNext(self):
|
||||
sock = ws.create_connection('wss://stream.meetup.com/2/rsvps')
|
||||
sock = ws.create_connection('wss://api.bitfinex.com/ws/2')
|
||||
self.assertEqual(str, type(next(sock)))
|
||||
|
||||
def testInternalRecvStrict(self):
|
||||
|
@ -383,6 +380,7 @@ class WebSocketTest(unittest.TestCase):
|
|||
s = ws.create_connection("ws://127.0.0.1:" + LOCAL_WS_SERVER_PORT,
|
||||
headers={"User-Agent": "PythonWebsocketClient"})
|
||||
self.assertNotEqual(s, None)
|
||||
self.assertEqual(s.getsubprotocol(), None)
|
||||
s.send("Hello, World")
|
||||
result = s.recv()
|
||||
self.assertEqual(result, "Hello, World")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue