11from util import *
2- from vonage .errors import MeetingsError , ClientError , ServerError
2+ from vonage .errors import MeetingsError , ClientError
33
44import responses
55import json
1010def test_create_instant_room (meetings , dummy_data ):
1111 stub (
1212 responses .POST ,
13- "https://api-eu.vonage.com/beta /meetings/rooms" ,
13+ "https://api-eu.vonage.com/v1 /meetings/rooms" ,
1414 fixture_path = 'meetings/meeting_room.json' ,
1515 )
1616
@@ -36,7 +36,7 @@ def test_create_instant_room_error_expiry(meetings, dummy_data):
3636def test_create_long_term_room (meetings , dummy_data ):
3737 stub (
3838 responses .POST ,
39- "https://api-eu.vonage.com/beta /meetings/rooms" ,
39+ "https://api-eu.vonage.com/v1 /meetings/rooms" ,
4040 fixture_path = 'meetings/long_term_room.json' ,
4141 )
4242
@@ -77,7 +77,7 @@ def test_create_long_term_room_error(meetings):
7777def test_get_room (meetings ):
7878 stub (
7979 responses .GET ,
80- 'https://api-eu.vonage.com/beta /meetings/rooms/b3142c46-d1c1-4405-baa6-85683827ed69' ,
80+ 'https://api-eu.vonage.com/v1 /meetings/rooms/b3142c46-d1c1-4405-baa6-85683827ed69' ,
8181 fixture_path = 'meetings/meeting_room.json' ,
8282 )
8383 meeting = meetings .get_room (room_id = 'b3142c46-d1c1-4405-baa6-85683827ed69' )
@@ -101,7 +101,7 @@ def test_get_room_error_no_room_specified(meetings):
101101def test_list_rooms (meetings ):
102102 stub (
103103 responses .GET ,
104- 'https://api-eu.vonage.com/beta /meetings/rooms' ,
104+ 'https://api-eu.vonage.com/v1 /meetings/rooms' ,
105105 fixture_path = 'meetings/multiple_rooms.json' ,
106106 )
107107 response = meetings .list_rooms ()
@@ -119,7 +119,7 @@ def test_list_rooms(meetings):
119119def test_list_rooms_with_page_size (meetings ):
120120 stub (
121121 responses .GET ,
122- 'https://api-eu.vonage.com/beta /meetings/rooms' ,
122+ 'https://api-eu.vonage.com/v1 /meetings/rooms' ,
123123 fixture_path = 'meetings/multiple_fewer_rooms.json' ,
124124 )
125125 response = meetings .list_rooms (page_size = 2 )
@@ -135,7 +135,7 @@ def test_list_rooms_with_page_size(meetings):
135135def test_error_unauthorized (meetings ):
136136 stub (
137137 responses .GET ,
138- 'https://api-eu.vonage.com/beta /meetings/rooms' ,
138+ 'https://api-eu.vonage.com/v1 /meetings/rooms' ,
139139 fixture_path = 'meetings/unauthorized.json' ,
140140 status_code = 401 ,
141141 )
@@ -148,7 +148,7 @@ def test_error_unauthorized(meetings):
148148def test_update_room (meetings ):
149149 stub (
150150 responses .PATCH ,
151- 'https://api-eu.vonage.com/beta /meetings/rooms/b3142c46-d1c1-4405-baa6-85683827ed69' ,
151+ 'https://api-eu.vonage.com/v1 /meetings/rooms/b3142c46-d1c1-4405-baa6-85683827ed69' ,
152152 fixture_path = 'meetings/update_room.json' ,
153153 )
154154
@@ -173,7 +173,7 @@ def test_update_room(meetings):
173173def test_add_theme_to_room (meetings ):
174174 stub (
175175 responses .PATCH ,
176- 'https://api-eu.vonage.com/beta /meetings/rooms/33791484-231c-421b-8349-96e1a44e27d2' ,
176+ 'https://api-eu.vonage.com/v1 /meetings/rooms/33791484-231c-421b-8349-96e1a44e27d2' ,
177177 fixture_path = 'meetings/long_term_room_with_theme.json' ,
178178 )
179179
@@ -190,7 +190,7 @@ def test_add_theme_to_room(meetings):
190190def test_update_room_error_no_room_specified (meetings ):
191191 stub (
192192 responses .PATCH ,
193- 'https://api-eu.vonage.com/beta /meetings/rooms/b3142c46-d1c1-4405-baa6-85683827ed69' ,
193+ 'https://api-eu.vonage.com/v1 /meetings/rooms/b3142c46-d1c1-4405-baa6-85683827ed69' ,
194194 fixture_path = 'meetings/update_room_type_error.json' ,
195195 status_code = 400 ,
196196 )
@@ -206,7 +206,7 @@ def test_update_room_error_no_room_specified(meetings):
206206def test_update_room_error_no_params_specified (meetings ):
207207 stub (
208208 responses .PATCH ,
209- 'https://api-eu.vonage.com/beta /meetings/rooms/33791484-231c-421b-8349-96e1a44e27d2' ,
209+ 'https://api-eu.vonage.com/v1 /meetings/rooms/33791484-231c-421b-8349-96e1a44e27d2' ,
210210 fixture_path = 'meetings/update_room_type_error.json' ,
211211 status_code = 400 ,
212212 )
@@ -219,7 +219,7 @@ def test_update_room_error_no_params_specified(meetings):
219219def test_get_recording (meetings ):
220220 stub (
221221 responses .GET ,
222- 'https://api-eu.vonage.com/beta /meetings/recordings/e5b73c98-c087-4ee5-b61b-0ea08204fc65' ,
222+ 'https://api-eu.vonage.com/v1 /meetings/recordings/e5b73c98-c087-4ee5-b61b-0ea08204fc65' ,
223223 fixture_path = 'meetings/get_recording.json' ,
224224 )
225225
@@ -236,7 +236,7 @@ def test_get_recording(meetings):
236236def test_get_recording_not_found (meetings ):
237237 stub (
238238 responses .GET ,
239- 'https://api-eu.vonage.com/beta /meetings/recordings/not-a-real-recording-id' ,
239+ 'https://api-eu.vonage.com/v1 /meetings/recordings/not-a-real-recording-id' ,
240240 fixture_path = 'meetings/get_recording_not_found.json' ,
241241 status_code = 404 ,
242242 )
@@ -253,7 +253,7 @@ def test_get_recording_not_found(meetings):
253253def test_delete_recording (meetings ):
254254 stub (
255255 responses .DELETE ,
256- 'https://api-eu.vonage.com/beta /meetings/recordings/e5b73c98-c087-4ee5-b61b-0ea08204fc65' ,
256+ 'https://api-eu.vonage.com/v1 /meetings/recordings/e5b73c98-c087-4ee5-b61b-0ea08204fc65' ,
257257 fixture_path = 'no_content.json' ,
258258 )
259259
@@ -264,7 +264,7 @@ def test_delete_recording(meetings):
264264def test_delete_recording_not_uploaded (meetings , client ):
265265 stub (
266266 responses .DELETE ,
267- 'https://api-eu.vonage.com/beta /meetings/recordings/881f0dbe-3d91-4fd6-aeea-0eca4209b512' ,
267+ 'https://api-eu.vonage.com/v1 /meetings/recordings/881f0dbe-3d91-4fd6-aeea-0eca4209b512' ,
268268 fixture_path = 'meetings/delete_recording_not_found.json' ,
269269 status_code = 404 ,
270270 )
@@ -278,7 +278,7 @@ def test_delete_recording_not_uploaded(meetings, client):
278278def test_get_session_recordings (meetings ):
279279 stub (
280280 responses .GET ,
281- 'https://api-eu.vonage.com/beta /meetings/sessions/1_MX40NjMzOTg5Mn5-MTY3NDYxNDI4NjY5M35WM0xaVXBSc1lpT3hKWE1XQ2diM1B3cXB-fn4/recordings' ,
281+ 'https://api-eu.vonage.com/v1 /meetings/sessions/1_MX40NjMzOTg5Mn5-MTY3NDYxNDI4NjY5M35WM0xaVXBSc1lpT3hKWE1XQ2diM1B3cXB-fn4/recordings' ,
282282 fixture_path = 'meetings/get_session_recordings.json' ,
283283 )
284284
@@ -294,7 +294,7 @@ def test_get_session_recordings(meetings):
294294def test_get_session_recordings_not_found (meetings ):
295295 stub (
296296 responses .GET ,
297- 'https://api-eu.vonage.com/beta /meetings/sessions/not-a-real-session-id/recordings' ,
297+ 'https://api-eu.vonage.com/v1 /meetings/sessions/not-a-real-session-id/recordings' ,
298298 fixture_path = 'meetings/get_session_recordings_not_found.json' ,
299299 status_code = 404 ,
300300 )
@@ -311,7 +311,7 @@ def test_get_session_recordings_not_found(meetings):
311311def test_list_dial_in_numbers (meetings ):
312312 stub (
313313 responses .GET ,
314- 'https://api-eu.vonage.com/beta /meetings/dial-in-numbers' ,
314+ 'https://api-eu.vonage.com/v1 /meetings/dial-in-numbers' ,
315315 fixture_path = 'meetings/list_dial_in_numbers.json' ,
316316 )
317317
@@ -326,7 +326,7 @@ def test_list_dial_in_numbers(meetings):
326326def test_list_themes (meetings ):
327327 stub (
328328 responses .GET ,
329- 'https://api-eu.vonage.com/beta /meetings/themes' ,
329+ 'https://api-eu.vonage.com/v1 /meetings/themes' ,
330330 fixture_path = 'meetings/list_themes.json' ,
331331 )
332332
@@ -343,7 +343,7 @@ def test_list_themes(meetings):
343343def test_list_themes_no_themes (meetings ):
344344 stub (
345345 responses .GET ,
346- 'https://api-eu.vonage.com/beta /meetings/themes' ,
346+ 'https://api-eu.vonage.com/v1 /meetings/themes' ,
347347 fixture_path = 'meetings/empty_themes.json' ,
348348 )
349349
@@ -354,7 +354,7 @@ def test_list_themes_no_themes(meetings):
354354def test_create_theme (meetings ):
355355 stub (
356356 responses .POST ,
357- "https://api-eu.vonage.com/beta /meetings/themes" ,
357+ "https://api-eu.vonage.com/v1 /meetings/themes" ,
358358 fixture_path = 'meetings/theme.json' ,
359359 )
360360
@@ -382,7 +382,7 @@ def test_create_theme_missing_required_params(meetings):
382382def test_create_theme_name_already_in_use (meetings ):
383383 stub (
384384 responses .POST ,
385- "https://api-eu.vonage.com/beta /meetings/themes" ,
385+ "https://api-eu.vonage.com/v1 /meetings/themes" ,
386386 fixture_path = 'meetings/theme_name_in_use.json' ,
387387 status_code = 409 ,
388388 )
@@ -404,7 +404,7 @@ def test_create_theme_name_already_in_use(meetings):
404404def test_get_theme (meetings ):
405405 stub (
406406 responses .GET ,
407- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
407+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
408408 fixture_path = 'meetings/theme.json' ,
409409 )
410410
@@ -417,7 +417,7 @@ def test_get_theme(meetings):
417417def test_get_theme_not_found (meetings ):
418418 stub (
419419 responses .GET ,
420- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc" ,
420+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc" ,
421421 fixture_path = 'meetings/theme_not_found.json' ,
422422 status_code = 404 ,
423423 )
@@ -434,7 +434,7 @@ def test_get_theme_not_found(meetings):
434434def test_delete_theme (meetings ):
435435 stub (
436436 responses .DELETE ,
437- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
437+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
438438 fixture_path = 'no_content.json' ,
439439 )
440440
@@ -446,7 +446,7 @@ def test_delete_theme(meetings):
446446def test_delete_theme_not_found (meetings ):
447447 stub (
448448 responses .DELETE ,
449- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc" ,
449+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc" ,
450450 fixture_path = 'meetings/theme_not_found.json' ,
451451 status_code = 404 ,
452452 )
@@ -463,7 +463,7 @@ def test_delete_theme_not_found(meetings):
463463def test_delete_theme_in_use (meetings ):
464464 stub (
465465 responses .DELETE ,
466- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
466+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
467467 fixture_path = 'meetings/delete_theme_in_use.json' ,
468468 status_code = 400 ,
469469 )
@@ -480,7 +480,7 @@ def test_delete_theme_in_use(meetings):
480480def test_update_theme (meetings ):
481481 stub (
482482 responses .PATCH ,
483- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
483+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
484484 fixture_path = 'meetings/updated_theme.json' ,
485485 )
486486
@@ -504,7 +504,7 @@ def test_update_theme(meetings):
504504def test_update_theme_no_keys (meetings ):
505505 stub (
506506 responses .PATCH ,
507- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
507+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db" ,
508508 fixture_path = 'meetings/update_no_keys.json' ,
509509 status_code = 400 ,
510510 )
@@ -521,7 +521,7 @@ def test_update_theme_no_keys(meetings):
521521def test_update_theme_not_found (meetings ):
522522 stub (
523523 responses .PATCH ,
524- "https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc" ,
524+ "https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc" ,
525525 fixture_path = 'meetings/theme_not_found.json' ,
526526 status_code = 404 ,
527527 )
@@ -541,7 +541,7 @@ def test_update_theme_not_found(meetings):
541541def test_update_theme_name_already_exists (meetings ):
542542 stub (
543543 responses .PATCH ,
544- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db' ,
544+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db' ,
545545 fixture_path = 'meetings/update_theme_already_exists.json' ,
546546 status_code = 409 ,
547547 )
@@ -560,7 +560,7 @@ def test_update_theme_name_already_exists(meetings):
560560def test_list_rooms_with_options (meetings ):
561561 stub (
562562 responses .GET ,
563- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db/rooms' ,
563+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db/rooms' ,
564564 fixture_path = 'meetings/list_rooms_with_theme_id.json' ,
565565 )
566566
@@ -584,7 +584,7 @@ def test_list_rooms_with_options(meetings):
584584def test_list_rooms_with_theme_id_not_found (meetings ):
585585 stub (
586586 responses .GET ,
587- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc/rooms' ,
587+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc/rooms' ,
588588 fixture_path = 'meetings/list_rooms_theme_id_not_found.json' ,
589589 status_code = 404 ,
590590 )
@@ -603,7 +603,7 @@ def test_list_rooms_with_theme_id_not_found(meetings):
603603def test_update_application_theme (meetings ):
604604 stub (
605605 responses .PATCH ,
606- 'https://api-eu.vonage.com/beta /meetings/applications' ,
606+ 'https://api-eu.vonage.com/v1 /meetings/applications' ,
607607 fixture_path = 'meetings/update_application_theme.json' ,
608608 )
609609
@@ -617,7 +617,7 @@ def test_update_application_theme(meetings):
617617def test_update_application_theme_bad_request (meetings ):
618618 stub (
619619 responses .PATCH ,
620- 'https://api-eu.vonage.com/beta /meetings/applications' ,
620+ 'https://api-eu.vonage.com/v1 /meetings/applications' ,
621621 fixture_path = 'meetings/update_application_theme_id_not_found.json' ,
622622 status_code = 400 ,
623623 )
@@ -634,7 +634,7 @@ def test_update_application_theme_bad_request(meetings):
634634def test_upload_logo_to_theme (meetings ):
635635 stub (
636636 responses .GET ,
637- 'https://api-eu.vonage.com/beta /meetings/themes/logos-upload-urls' ,
637+ 'https://api-eu.vonage.com/v1 /meetings/themes/logos-upload-urls' ,
638638 fixture_path = 'meetings/list_logo_upload_urls.json' ,
639639 )
640640 stub (
@@ -645,7 +645,7 @@ def test_upload_logo_to_theme(meetings):
645645 )
646646 stub_bytes (
647647 responses .PUT ,
648- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db/finalizeLogos' ,
648+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db/finalizeLogos' ,
649649 body = b'OK' ,
650650 )
651651
@@ -661,7 +661,7 @@ def test_upload_logo_to_theme(meetings):
661661def test_get_logo_upload_url (meetings ):
662662 stub (
663663 responses .GET ,
664- 'https://api-eu.vonage.com/beta /meetings/themes/logos-upload-urls' ,
664+ 'https://api-eu.vonage.com/v1 /meetings/themes/logos-upload-urls' ,
665665 fixture_path = 'meetings/list_logo_upload_urls.json' ,
666666 )
667667
@@ -732,7 +732,7 @@ def test_upload_to_aws_error(meetings):
732732def test_add_logo_to_theme (meetings ):
733733 stub_bytes (
734734 responses .PUT ,
735- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654db/finalizeLogos' ,
735+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654db/finalizeLogos' ,
736736 body = b'OK' ,
737737 )
738738
@@ -747,7 +747,7 @@ def test_add_logo_to_theme(meetings):
747747def test_add_logo_to_theme_key_error (meetings ):
748748 stub (
749749 responses .PUT ,
750- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc/finalizeLogos' ,
750+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc/finalizeLogos' ,
751751 fixture_path = 'meetings/logo_key_error.json' ,
752752 status_code = 400 ,
753753 )
@@ -767,7 +767,7 @@ def test_add_logo_to_theme_key_error(meetings):
767767def test_add_logo_to_theme_not_found_error (meetings ):
768768 stub (
769769 responses .PUT ,
770- 'https://api-eu.vonage.com/beta /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc/finalizeLogos' ,
770+ 'https://api-eu.vonage.com/v1 /meetings/themes/90a21428-b74a-4221-adc3-783935d654dc/finalizeLogos' ,
771771 fixture_path = 'meetings/theme_not_found.json' ,
772772 status_code = 404 ,
773773 )
0 commit comments