@@ -52,34 +52,34 @@ def start_server():
5252 flask_process .terminate ()
5353
5454
55- class TestConnectingToServer :
56- @pytest .mark .asyncio
57- async def test_valid_credentials (self ):
58- notifier = FishjamNotifier (
59- fishjam_url = FISHJAM_URL , management_token = SERVER_API_TOKEN
60- )
55+ # class TestConnectingToServer:
56+ # @pytest.mark.asyncio
57+ # async def test_valid_credentials(self):
58+ # notifier = FishjamNotifier(
59+ # fishjam_url=FISHJAM_URL, management_token=SERVER_API_TOKEN
60+ # )
6161
62- @notifier .on_server_notification
63- def handle_notitifcation (_notification ):
64- pass
62+ # @notifier.on_server_notification
63+ # def handle_notitifcation(_notification):
64+ # pass
6565
66- notifier_task = asyncio .create_task (notifier .connect ())
67- await notifier .wait_ready ()
68- # pylint: disable=protected-access
69- assert notifier ._websocket .open
66+ # notifier_task = asyncio.create_task(notifier.connect())
67+ # await notifier.wait_ready()
68+ # # pylint: disable=protected-access
69+ # assert notifier._websocket.open
7070
71- await cancel (notifier_task )
71+ # await cancel(notifier_task)
7272
73- @pytest .mark .asyncio
74- async def test_invalid_credentials (self ):
75- notifier = FishjamNotifier (
76- fishjam_url = FISHJAM_URL , management_token = "wrong_token"
77- )
73+ # @pytest.mark.asyncio
74+ # async def test_invalid_credentials(self):
75+ # notifier = FishjamNotifier(
76+ # fishjam_url=FISHJAM_URL, management_token="wrong_token"
77+ # )
7878
79- task = asyncio .create_task (notifier .connect ())
79+ # task = asyncio.create_task(notifier.connect())
8080
81- with pytest .raises (RuntimeError ):
82- await task
81+ # with pytest.raises(RuntimeError):
82+ # await task
8383
8484
8585@pytest .fixture
@@ -154,45 +154,6 @@ async def test_peer_connected_disconnected(
154154 for event in event_checks :
155155 self .assert_event (event )
156156
157- @pytest .mark .asyncio
158- async def test_peer_connected_disconnected_deleted (
159- self , room_api : FishjamClient , notifier : FishjamNotifier
160- ):
161- event_checks = [
162- ServerMessageRoomCreated ,
163- ServerMessagePeerAdded ,
164- ServerMessagePeerConnected ,
165- ServerMessagePeerDisconnected ,
166- ServerMessagePeerDeleted ,
167- ServerMessageRoomDeleted ,
168- ]
169-
170- assert_task = asyncio .create_task (assert_events (notifier , event_checks .copy ()))
171-
172- notifier_task = asyncio .create_task (notifier .connect ())
173- await notifier .wait_ready ()
174-
175- options = RoomOptions (
176- webhook_url = WEBHOOK_URL ,
177- peerless_purge_timeout = 2 ,
178- peer_disconnected_timeout = 1 ,
179- )
180- room = room_api .create_room (options = options )
181-
182- _peer , token = room_api .create_peer (room .id )
183-
184- peer_socket = PeerSocket (fishjam_url = FISHJAM_URL , auto_close = True )
185- peer_task = asyncio .create_task (peer_socket .connect (token ))
186-
187- await peer_socket .wait_ready ()
188-
189- await assert_task
190- await cancel (peer_task )
191- await cancel (notifier_task )
192-
193- for event in event_checks :
194- self .assert_event (event )
195-
196157 @pytest .mark .asyncio
197158 async def test_peer_connected_room_deleted (
198159 self , room_api : FishjamClient , notifier : FishjamNotifier
0 commit comments