@@ -67,6 +67,7 @@ def test_no_params(self, room_api: FishjamClient):
6767 max_peers = None ,
6868 webhook_url = None ,
6969 room_type = RoomType (CONFERENCE ),
70+ video_codec = VideoCodec .H264 ,
7071 )
7172
7273 assert room == Room (
@@ -77,7 +78,7 @@ def test_no_params(self, room_api: FishjamClient):
7778
7879 assert room in room_api .get_all_rooms ()
7980
80- def test_valid_params (self , room_api ):
81+ def test_valid_params (self , room_api : FishjamClient ):
8182 options = RoomOptions (
8283 max_peers = MAX_PEERS ,
8384 video_codec = CODEC_H264 ,
@@ -87,7 +88,7 @@ def test_valid_params(self, room_api):
8788
8889 config = RoomConfig (
8990 max_peers = MAX_PEERS ,
90- video_codec = VideoCodec ( CODEC_H264 ) ,
91+ video_codec = VideoCodec . H264 ,
9192 webhook_url = None ,
9293 room_type = RoomType (AUDIO_ONLY ),
9394 )
@@ -100,36 +101,37 @@ def test_valid_params(self, room_api):
100101
101102 assert room in room_api .get_all_rooms ()
102103
103- def test_invalid_max_peers (self , room_api ):
104+ def test_invalid_max_peers (self , room_api : FishjamClient ):
104105 options = RoomOptions (max_peers = "10" )
105106
106107 with pytest .raises (BadRequestError ):
107108 room_api .create_room (options )
108109
109- def test_invalid_video_codec (self , room_api ):
110+ def test_invalid_video_codec (self , room_api : FishjamClient ):
110111 with pytest .raises (ValueError ):
111112 options = RoomOptions (video_codec = "h420" )
112113 room_api .create_room (options )
113114
114115
115116class TestDeleteRoom :
116- def test_valid (self , room_api ):
117+ def test_valid (self , room_api : FishjamClient ):
117118 room = room_api .create_room ()
118119
119120 room_api .delete_room (room .id )
120- assert room not in room_api .get_all_rooms ()
121+ for r in room_api .get_all_rooms ():
122+ assert room .id != r .id
121123
122- def test_invalid_id (self , room_api ):
124+ def test_invalid_id (self , room_api : FishjamClient ):
123125 with pytest .raises (BadRequestError ):
124126 room_api .delete_room ("invalid_id" )
125127
126- def test_id_not_found (self , room_api ):
128+ def test_id_not_found (self , room_api : FishjamClient ):
127129 with pytest .raises (NotFoundError ):
128130 room_api .delete_room ("515c8b52-168b-4b39-a227-4d6b4f102a56" )
129131
130132
131133class TestGetAllRooms :
132- def test_valid (self , room_api ):
134+ def test_valid (self , room_api : FishjamClient ):
133135 room = room_api .create_room ()
134136 all_rooms = room_api .get_all_rooms ()
135137
@@ -145,6 +147,7 @@ def test_valid(self, room_api: FishjamClient):
145147 max_peers = None ,
146148 webhook_url = None ,
147149 room_type = RoomType (CONFERENCE ),
150+ video_codec = VideoCodec .H264 ,
148151 )
149152
150153 assert Room (
@@ -157,7 +160,7 @@ def test_invalid(self, room_api: FishjamClient):
157160 with pytest .raises (NotFoundError ):
158161 room_api .get_room ("invalid_id" )
159162
160- def test_id_not_found (self , room_api ):
163+ def test_id_not_found (self , room_api : FishjamClient ):
161164 with pytest .raises (NotFoundError ):
162165 room_api .get_room ("515c8b52-168b-4b39-a227-4d6b4f102a56" )
163166
0 commit comments