From f1f96fe82bb93e9a435b90124c19cd2287fd53d6 Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Thu, 26 Oct 2023 22:45:52 -0500 Subject: [PATCH] SDK update generated by liblab --- README.md | 108 +++++++++--------- src/plexsdk/README.md | 108 +++++++++--------- src/plexsdk/net/environment.py | 2 +- src/plexsdk/services/README.md | 106 ++++++++--------- src/plexsdk/services/base.py | 2 +- test/models/test_get_butler_tasks_response.py | 4 +- test/models/test_get_devices_response.py | 4 +- .../test_get_my_plex_account_response.py | 4 +- test/models/test_get_on_deck_response.py | 4 +- .../test_get_recently_added_response.py | 4 +- .../test_get_search_results_response.py | 4 +- .../test_get_server_activities_response.py | 4 +- .../test_get_server_capabilities_response.py | 4 +- .../test_get_server_identity_response.py | 4 +- test/models/test_get_server_list_response.py | 4 +- .../test_get_transcode_sessions_response.py | 4 +- test/services/test_activities.py | 14 +-- test/services/test_butler.py | 24 ++-- test/services/test_hubs.py | 18 +-- test/services/test_library.py | 102 ++++++++--------- test/services/test_log.py | 18 +-- test/services/test_media.py | 30 ++--- test/services/test_playlists.py | 90 +++++++-------- test/services/test_search.py | 30 ++--- test/services/test_security.py | 16 +-- test/services/test_server.py | 40 ++++--- test/services/test_sessions.py | 26 ++--- test/services/test_updater.py | 12 +- test/services/test_video.py | 93 ++++++++------- 29 files changed, 446 insertions(+), 437 deletions(-) diff --git a/README.md b/README.md index 228d8a7..bd7069d 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ sdk.server.set_api_key('YOUR_API_KEY', 'YOUR_API_KEY_HEADER') ## API Endpoint Services -All URIs are relative to {protocol}://{ip}:{port}. +All URIs are relative to http://10.10.10.47:32400. Click the service name for a full list of the service methods. @@ -577,7 +577,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.media.update_play_progress( key = 'key', - time = 8535962.551714689, + time = -21007029.127889782, state = 'state' ) @@ -739,7 +739,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.butler.start_task(task_name = 'CleanOldBundles') +results = sdk.butler.start_task(task_name = 'BackupDatabase') pprint(vars(results)) @@ -766,7 +766,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.butler.stop_task(task_name = 'BuildGracenoteCollections') +results = sdk.butler.stop_task(task_name = 'GenerateAutoTags') pprint(vars(results)) @@ -796,8 +796,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.hubs.get_global_hubs( - count = -21278281.03559582, - only_transient = 42.1 + count = -25530716.436555773, + only_transient = 1 ) pprint(vars(results)) @@ -828,9 +828,9 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.hubs.get_library_hubs( - section_id = -58449853.97546232, - count = 19599615.466092095, - only_transient = 42.1 + section_id = 89136618.25964785, + count = -44116336.8194041, + only_transient = 1 ) pprint(vars(results)) @@ -862,8 +862,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.search.perform_search( - query = 'arnold', - section_id = -56180545.95318425, + query = 'dylan', + section_id = 69456479.38410482, limit = 5 ) @@ -896,7 +896,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.search.perform_voice_search( query = 'dead+poop', - section_id = 69248804.72578311, + section_id = -89240370.29516296, limit = 5 ) @@ -956,7 +956,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_file_hash( url = 'file://C:\Image.png&type=13', - type = -87442821.49664992 + type = -93479594.8520502 ) pprint(vars(results)) @@ -1097,8 +1097,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_library_items( - section_id = 36759422.79452938, - type = 85955460.47229531, + section_id = -59611894.83078693, + type = 61422299.35649505, filter = 'filter' ) @@ -1127,7 +1127,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.refresh_library(section_id = -11046452.742861003) +results = sdk.library.refresh_library(section_id = -18672976.902678773) pprint(vars(results)) @@ -1157,8 +1157,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_latest_library_items( - section_id = -72167450.51781249, - type = 84030430.945622, + section_id = -58307061.73064084, + type = 54395952.1588783, filter = 'filter' ) @@ -1190,8 +1190,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_common_library_items( - section_id = 84909442.48641255, - type = 81418870.30483484, + section_id = -96350957.04933052, + type = -59684397.0411133, filter = 'filter' ) @@ -1220,7 +1220,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.get_metadata(rating_key = -79180953.0704827) +results = sdk.library.get_metadata(rating_key = -75419040.74332453) pprint(vars(results)) @@ -1247,7 +1247,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.get_metadata_children(rating_key = 22112069.91905561) +results = sdk.library.get_metadata_children(rating_key = -1105110.1166751534) pprint(vars(results)) @@ -1330,7 +1330,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.log.log_line( - level = 1, + level = 2, message = 'message', source = 'source' ) @@ -1393,10 +1393,10 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.create_playlist( title = 'title', - type = 'audio', + type = 'photo', smart = 1, uri = 'uri', - play_queue_id = -92047882.95265284 + play_queue_id = 24795931.71901846 ) pprint(vars(results)) @@ -1426,7 +1426,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.get_playlists( - playlist_type = 'photo', + playlist_type = 'video', smart = 1 ) @@ -1455,7 +1455,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.get_playlist(playlist_id = 83585352.9850379) +results = sdk.playlists.get_playlist(playlist_id = 92652013.47806525) pprint(vars(results)) @@ -1482,7 +1482,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.delete_playlist(playlist_id = 97044833.44888172) +results = sdk.playlists.delete_playlist(playlist_id = 15166092.952776998) pprint(vars(results)) @@ -1509,7 +1509,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.update_playlist(playlist_id = -48390592.04133318) +results = sdk.playlists.update_playlist(playlist_id = -13354153.8729752) pprint(vars(results)) @@ -1538,8 +1538,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.get_playlist_contents( - playlist_id = 86594016.93713528, - type = 92063710.76575199 + playlist_id = 72191503.82096133, + type = -50585783.98957678 ) pprint(vars(results)) @@ -1567,7 +1567,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.clear_playlist_contents(playlist_id = -5395985.032092914) +results = sdk.playlists.clear_playlist_contents(playlist_id = 8693313.65152806) pprint(vars(results)) @@ -1597,7 +1597,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.add_playlist_contents( - playlist_id = -6920661.3914530575, + playlist_id = 41362150.74332705, uri = 'library://..', play_queue_id = 123 ) @@ -1850,7 +1850,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.updater.check_for_updates(download = 1) +results = sdk.updater.check_for_updates(download = 'foo') pprint(vars(results)) @@ -1879,7 +1879,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.updater.apply_updates( - tonight = 'foo', + tonight = 1, skip = 1 ) @@ -1925,22 +1925,22 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.video.start_universal_transcode( - has_mde = 68681526.6739457, + has_mde = -81137488.49360377, path = 'path', - media_index = 38635292.15502611, - part_index = 56377101.56072605, + media_index = -77210832.41519478, + part_index = -72229071.84453362, protocol = 'protocol', - fast_seek = -48546578.06404572, - direct_play = -4004169.7057704926, - direct_stream = -63607905.2844202, - subtitle_size = -95264880.14792101, + fast_seek = -34663937.278298415, + direct_play = -65649475.52201366, + direct_stream = -45808524.16842922, + subtitle_size = -22927306.960050985, subtites = 'subtites', - audio_boost = 92032906.1650356, + audio_boost = -27400291.423254773, location = 'location', - media_buffer_size = 43422490.76220566, + media_buffer_size = 23155108.458466023, session = 'session', - add_debug_overlay = -40848683.38562142, - auto_adjust_quality = 63926343.42811155 + add_debug_overlay = 84869389.04259121, + auto_adjust_quality = 36723992.04259604 ) pprint(vars(results)) @@ -1978,16 +1978,16 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.video.get_timeline( - rating_key = 45215776.89077535, + rating_key = -59189022.367571995, key = 'key', - state = 'playing', - has_mde = -17905072.874770716, - time = -7347989.028095856, - duration = 82330750.57461244, + state = 'paused', + has_mde = 84394939.21690026, + time = 76537742.6976276, + duration = -90087270.61978817, context = 'context', - play_queue_item_id = -69611222.19233666, - play_back_time = -80252961.1853132, - row = -54653572.50923404 + play_queue_item_id = -71830087.03538291, + play_back_time = 61930081.99176124, + row = 23118864.63882491 ) pprint(vars(results)) diff --git a/src/plexsdk/README.md b/src/plexsdk/README.md index 228d8a7..bd7069d 100644 --- a/src/plexsdk/README.md +++ b/src/plexsdk/README.md @@ -54,7 +54,7 @@ sdk.server.set_api_key('YOUR_API_KEY', 'YOUR_API_KEY_HEADER') ## API Endpoint Services -All URIs are relative to {protocol}://{ip}:{port}. +All URIs are relative to http://10.10.10.47:32400. Click the service name for a full list of the service methods. @@ -577,7 +577,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.media.update_play_progress( key = 'key', - time = 8535962.551714689, + time = -21007029.127889782, state = 'state' ) @@ -739,7 +739,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.butler.start_task(task_name = 'CleanOldBundles') +results = sdk.butler.start_task(task_name = 'BackupDatabase') pprint(vars(results)) @@ -766,7 +766,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.butler.stop_task(task_name = 'BuildGracenoteCollections') +results = sdk.butler.stop_task(task_name = 'GenerateAutoTags') pprint(vars(results)) @@ -796,8 +796,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.hubs.get_global_hubs( - count = -21278281.03559582, - only_transient = 42.1 + count = -25530716.436555773, + only_transient = 1 ) pprint(vars(results)) @@ -828,9 +828,9 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.hubs.get_library_hubs( - section_id = -58449853.97546232, - count = 19599615.466092095, - only_transient = 42.1 + section_id = 89136618.25964785, + count = -44116336.8194041, + only_transient = 1 ) pprint(vars(results)) @@ -862,8 +862,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.search.perform_search( - query = 'arnold', - section_id = -56180545.95318425, + query = 'dylan', + section_id = 69456479.38410482, limit = 5 ) @@ -896,7 +896,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.search.perform_voice_search( query = 'dead+poop', - section_id = 69248804.72578311, + section_id = -89240370.29516296, limit = 5 ) @@ -956,7 +956,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_file_hash( url = 'file://C:\Image.png&type=13', - type = -87442821.49664992 + type = -93479594.8520502 ) pprint(vars(results)) @@ -1097,8 +1097,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_library_items( - section_id = 36759422.79452938, - type = 85955460.47229531, + section_id = -59611894.83078693, + type = 61422299.35649505, filter = 'filter' ) @@ -1127,7 +1127,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.refresh_library(section_id = -11046452.742861003) +results = sdk.library.refresh_library(section_id = -18672976.902678773) pprint(vars(results)) @@ -1157,8 +1157,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_latest_library_items( - section_id = -72167450.51781249, - type = 84030430.945622, + section_id = -58307061.73064084, + type = 54395952.1588783, filter = 'filter' ) @@ -1190,8 +1190,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_common_library_items( - section_id = 84909442.48641255, - type = 81418870.30483484, + section_id = -96350957.04933052, + type = -59684397.0411133, filter = 'filter' ) @@ -1220,7 +1220,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.get_metadata(rating_key = -79180953.0704827) +results = sdk.library.get_metadata(rating_key = -75419040.74332453) pprint(vars(results)) @@ -1247,7 +1247,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.get_metadata_children(rating_key = 22112069.91905561) +results = sdk.library.get_metadata_children(rating_key = -1105110.1166751534) pprint(vars(results)) @@ -1330,7 +1330,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.log.log_line( - level = 1, + level = 2, message = 'message', source = 'source' ) @@ -1393,10 +1393,10 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.create_playlist( title = 'title', - type = 'audio', + type = 'photo', smart = 1, uri = 'uri', - play_queue_id = -92047882.95265284 + play_queue_id = 24795931.71901846 ) pprint(vars(results)) @@ -1426,7 +1426,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.get_playlists( - playlist_type = 'photo', + playlist_type = 'video', smart = 1 ) @@ -1455,7 +1455,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.get_playlist(playlist_id = 83585352.9850379) +results = sdk.playlists.get_playlist(playlist_id = 92652013.47806525) pprint(vars(results)) @@ -1482,7 +1482,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.delete_playlist(playlist_id = 97044833.44888172) +results = sdk.playlists.delete_playlist(playlist_id = 15166092.952776998) pprint(vars(results)) @@ -1509,7 +1509,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.update_playlist(playlist_id = -48390592.04133318) +results = sdk.playlists.update_playlist(playlist_id = -13354153.8729752) pprint(vars(results)) @@ -1538,8 +1538,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.get_playlist_contents( - playlist_id = 86594016.93713528, - type = 92063710.76575199 + playlist_id = 72191503.82096133, + type = -50585783.98957678 ) pprint(vars(results)) @@ -1567,7 +1567,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.clear_playlist_contents(playlist_id = -5395985.032092914) +results = sdk.playlists.clear_playlist_contents(playlist_id = 8693313.65152806) pprint(vars(results)) @@ -1597,7 +1597,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.add_playlist_contents( - playlist_id = -6920661.3914530575, + playlist_id = 41362150.74332705, uri = 'library://..', play_queue_id = 123 ) @@ -1850,7 +1850,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.updater.check_for_updates(download = 1) +results = sdk.updater.check_for_updates(download = 'foo') pprint(vars(results)) @@ -1879,7 +1879,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.updater.apply_updates( - tonight = 'foo', + tonight = 1, skip = 1 ) @@ -1925,22 +1925,22 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.video.start_universal_transcode( - has_mde = 68681526.6739457, + has_mde = -81137488.49360377, path = 'path', - media_index = 38635292.15502611, - part_index = 56377101.56072605, + media_index = -77210832.41519478, + part_index = -72229071.84453362, protocol = 'protocol', - fast_seek = -48546578.06404572, - direct_play = -4004169.7057704926, - direct_stream = -63607905.2844202, - subtitle_size = -95264880.14792101, + fast_seek = -34663937.278298415, + direct_play = -65649475.52201366, + direct_stream = -45808524.16842922, + subtitle_size = -22927306.960050985, subtites = 'subtites', - audio_boost = 92032906.1650356, + audio_boost = -27400291.423254773, location = 'location', - media_buffer_size = 43422490.76220566, + media_buffer_size = 23155108.458466023, session = 'session', - add_debug_overlay = -40848683.38562142, - auto_adjust_quality = 63926343.42811155 + add_debug_overlay = 84869389.04259121, + auto_adjust_quality = 36723992.04259604 ) pprint(vars(results)) @@ -1978,16 +1978,16 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.video.get_timeline( - rating_key = 45215776.89077535, + rating_key = -59189022.367571995, key = 'key', - state = 'playing', - has_mde = -17905072.874770716, - time = -7347989.028095856, - duration = 82330750.57461244, + state = 'paused', + has_mde = 84394939.21690026, + time = 76537742.6976276, + duration = -90087270.61978817, context = 'context', - play_queue_item_id = -69611222.19233666, - play_back_time = -80252961.1853132, - row = -54653572.50923404 + play_queue_item_id = -71830087.03538291, + play_back_time = 61930081.99176124, + row = 23118864.63882491 ) pprint(vars(results)) diff --git a/src/plexsdk/net/environment.py b/src/plexsdk/net/environment.py index 36af8fe..4583eb3 100644 --- a/src/plexsdk/net/environment.py +++ b/src/plexsdk/net/environment.py @@ -8,4 +8,4 @@ from enum import Enum class Environment(Enum): """The environments available for this SDK""" - DEFAULT = "{protocol}://{ip}:{port}" + DEFAULT = "http://10.10.10.47:32400" diff --git a/src/plexsdk/services/README.md b/src/plexsdk/services/README.md index d51d73a..dff1b6f 100644 --- a/src/plexsdk/services/README.md +++ b/src/plexsdk/services/README.md @@ -474,7 +474,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.media.update_play_progress( key = 'key', - time = 8535962.551714689, + time = -21007029.127889782, state = 'state' ) @@ -636,7 +636,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.butler.start_task(task_name = 'CleanOldBundles') +results = sdk.butler.start_task(task_name = 'BackupDatabase') pprint(vars(results)) @@ -663,7 +663,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.butler.stop_task(task_name = 'BuildGracenoteCollections') +results = sdk.butler.stop_task(task_name = 'GenerateAutoTags') pprint(vars(results)) @@ -693,8 +693,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.hubs.get_global_hubs( - count = -21278281.03559582, - only_transient = 42.1 + count = -25530716.436555773, + only_transient = 1 ) pprint(vars(results)) @@ -725,9 +725,9 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.hubs.get_library_hubs( - section_id = -58449853.97546232, - count = 19599615.466092095, - only_transient = 42.1 + section_id = 89136618.25964785, + count = -44116336.8194041, + only_transient = 1 ) pprint(vars(results)) @@ -759,8 +759,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.search.perform_search( - query = 'arnold', - section_id = -56180545.95318425, + query = 'dylan', + section_id = 69456479.38410482, limit = 5 ) @@ -793,7 +793,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.search.perform_voice_search( query = 'dead+poop', - section_id = 69248804.72578311, + section_id = -89240370.29516296, limit = 5 ) @@ -853,7 +853,7 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_file_hash( url = 'file://C:\Image.png&type=13', - type = -87442821.49664992 + type = -93479594.8520502 ) pprint(vars(results)) @@ -994,8 +994,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_library_items( - section_id = 36759422.79452938, - type = 85955460.47229531, + section_id = -59611894.83078693, + type = 61422299.35649505, filter = 'filter' ) @@ -1024,7 +1024,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.refresh_library(section_id = -11046452.742861003) +results = sdk.library.refresh_library(section_id = -18672976.902678773) pprint(vars(results)) @@ -1054,8 +1054,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_latest_library_items( - section_id = -72167450.51781249, - type = 84030430.945622, + section_id = -58307061.73064084, + type = 54395952.1588783, filter = 'filter' ) @@ -1087,8 +1087,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.library.get_common_library_items( - section_id = 84909442.48641255, - type = 81418870.30483484, + section_id = -96350957.04933052, + type = -59684397.0411133, filter = 'filter' ) @@ -1117,7 +1117,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.get_metadata(rating_key = -79180953.0704827) +results = sdk.library.get_metadata(rating_key = -75419040.74332453) pprint(vars(results)) @@ -1144,7 +1144,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.library.get_metadata_children(rating_key = 22112069.91905561) +results = sdk.library.get_metadata_children(rating_key = -1105110.1166751534) pprint(vars(results)) @@ -1227,7 +1227,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.log.log_line( - level = 1, + level = 2, message = 'message', source = 'source' ) @@ -1290,10 +1290,10 @@ sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.create_playlist( title = 'title', - type = 'audio', + type = 'photo', smart = 1, uri = 'uri', - play_queue_id = -92047882.95265284 + play_queue_id = 24795931.71901846 ) pprint(vars(results)) @@ -1323,7 +1323,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.get_playlists( - playlist_type = 'photo', + playlist_type = 'video', smart = 1 ) @@ -1352,7 +1352,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.get_playlist(playlist_id = 83585352.9850379) +results = sdk.playlists.get_playlist(playlist_id = 92652013.47806525) pprint(vars(results)) @@ -1379,7 +1379,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.delete_playlist(playlist_id = 97044833.44888172) +results = sdk.playlists.delete_playlist(playlist_id = 15166092.952776998) pprint(vars(results)) @@ -1406,7 +1406,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.update_playlist(playlist_id = -48390592.04133318) +results = sdk.playlists.update_playlist(playlist_id = -13354153.8729752) pprint(vars(results)) @@ -1435,8 +1435,8 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.get_playlist_contents( - playlist_id = 86594016.93713528, - type = 92063710.76575199 + playlist_id = 72191503.82096133, + type = -50585783.98957678 ) pprint(vars(results)) @@ -1464,7 +1464,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.playlists.clear_playlist_contents(playlist_id = -5395985.032092914) +results = sdk.playlists.clear_playlist_contents(playlist_id = 8693313.65152806) pprint(vars(results)) @@ -1494,7 +1494,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.playlists.add_playlist_contents( - playlist_id = -6920661.3914530575, + playlist_id = 41362150.74332705, uri = 'library://..', play_queue_id = 123 ) @@ -1747,7 +1747,7 @@ from pprint import pprint from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) -results = sdk.updater.check_for_updates(download = 1) +results = sdk.updater.check_for_updates(download = 'foo') pprint(vars(results)) @@ -1776,7 +1776,7 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.updater.apply_updates( - tonight = 'foo', + tonight = 1, skip = 1 ) @@ -1822,22 +1822,22 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.video.start_universal_transcode( - has_mde = 68681526.6739457, + has_mde = -81137488.49360377, path = 'path', - media_index = 38635292.15502611, - part_index = 56377101.56072605, + media_index = -77210832.41519478, + part_index = -72229071.84453362, protocol = 'protocol', - fast_seek = -48546578.06404572, - direct_play = -4004169.7057704926, - direct_stream = -63607905.2844202, - subtitle_size = -95264880.14792101, + fast_seek = -34663937.278298415, + direct_play = -65649475.52201366, + direct_stream = -45808524.16842922, + subtitle_size = -22927306.960050985, subtites = 'subtites', - audio_boost = 92032906.1650356, + audio_boost = -27400291.423254773, location = 'location', - media_buffer_size = 43422490.76220566, + media_buffer_size = 23155108.458466023, session = 'session', - add_debug_overlay = -40848683.38562142, - auto_adjust_quality = 63926343.42811155 + add_debug_overlay = 84869389.04259121, + auto_adjust_quality = 36723992.04259604 ) pprint(vars(results)) @@ -1875,16 +1875,16 @@ from plexsdk import PlexSDK sdk = PlexSDK() sdk.set_api_key(getenv("PLEXSDK_API_KEY")) results = sdk.video.get_timeline( - rating_key = 45215776.89077535, + rating_key = -59189022.367571995, key = 'key', - state = 'playing', - has_mde = -17905072.874770716, - time = -7347989.028095856, - duration = 82330750.57461244, + state = 'paused', + has_mde = 84394939.21690026, + time = 76537742.6976276, + duration = -90087270.61978817, context = 'context', - play_queue_item_id = -69611222.19233666, - play_back_time = -80252961.1853132, - row = -54653572.50923404 + play_queue_item_id = -71830087.03538291, + play_back_time = 61930081.99176124, + row = 23118864.63882491 ) pprint(vars(results)) diff --git a/src/plexsdk/services/base.py b/src/plexsdk/services/base.py index f8b0d0e..3754ed2 100644 --- a/src/plexsdk/services/base.py +++ b/src/plexsdk/services/base.py @@ -31,7 +31,7 @@ class BaseService: Sets the base url """ - _url_prefix = "{protocol}://{ip}:{port}" + _url_prefix = "http://10.10.10.47:32400" _http = HTTPClient(None) diff --git a/test/models/test_get_butler_tasks_response.py b/test/models/test_get_butler_tasks_response.py index f8b5f78..a287ec8 100644 --- a/test/models/test_get_butler_tasks_response.py +++ b/test/models/test_get_butler_tasks_response.py @@ -8,8 +8,8 @@ class TestGetButlerTasksResponseModel(unittest.TestCase): def test_get_butler_tasks_response(self): # Create GetButlerTasksResponse class instance - test_model = GetButlerTasksResponse(ButlerTasks={"accusantium": 1}) - self.assertEqual(test_model.ButlerTasks, {"accusantium": 1}) + test_model = GetButlerTasksResponse(ButlerTasks={"libero": 4}) + self.assertEqual(test_model.ButlerTasks, {"libero": 4}) if __name__ == "__main__": diff --git a/test/models/test_get_devices_response.py b/test/models/test_get_devices_response.py index 2944bc4..f0499ac 100644 --- a/test/models/test_get_devices_response.py +++ b/test/models/test_get_devices_response.py @@ -8,8 +8,8 @@ class TestGetDevicesResponseModel(unittest.TestCase): def test_get_devices_response(self): # Create GetDevicesResponse class instance - test_model = GetDevicesResponse(MediaContainer={"velit": 1}) - self.assertEqual(test_model.MediaContainer, {"velit": 1}) + test_model = GetDevicesResponse(MediaContainer={"est": 3}) + self.assertEqual(test_model.MediaContainer, {"est": 3}) if __name__ == "__main__": diff --git a/test/models/test_get_my_plex_account_response.py b/test/models/test_get_my_plex_account_response.py index 13c1108..ba55743 100644 --- a/test/models/test_get_my_plex_account_response.py +++ b/test/models/test_get_my_plex_account_response.py @@ -8,8 +8,8 @@ class TestGetMyPlexAccountResponseModel(unittest.TestCase): def test_get_my_plex_account_response(self): # Create GetMyPlexAccountResponse class instance - test_model = GetMyPlexAccountResponse(MyPlex={"repellat": 8}) - self.assertEqual(test_model.MyPlex, {"repellat": 8}) + test_model = GetMyPlexAccountResponse(MyPlex={"at": 7}) + self.assertEqual(test_model.MyPlex, {"at": 7}) if __name__ == "__main__": diff --git a/test/models/test_get_on_deck_response.py b/test/models/test_get_on_deck_response.py index 5df6afb..67a0554 100644 --- a/test/models/test_get_on_deck_response.py +++ b/test/models/test_get_on_deck_response.py @@ -8,8 +8,8 @@ class TestGetOnDeckResponseModel(unittest.TestCase): def test_get_on_deck_response(self): # Create GetOnDeckResponse class instance - test_model = GetOnDeckResponse(MediaContainer={"quisquam": 1}) - self.assertEqual(test_model.MediaContainer, {"quisquam": 1}) + test_model = GetOnDeckResponse(MediaContainer={"doloremque": 5}) + self.assertEqual(test_model.MediaContainer, {"doloremque": 5}) if __name__ == "__main__": diff --git a/test/models/test_get_recently_added_response.py b/test/models/test_get_recently_added_response.py index 9c531c2..23f4c5f 100644 --- a/test/models/test_get_recently_added_response.py +++ b/test/models/test_get_recently_added_response.py @@ -8,8 +8,8 @@ class TestGetRecentlyAddedResponseModel(unittest.TestCase): def test_get_recently_added_response(self): # Create GetRecentlyAddedResponse class instance - test_model = GetRecentlyAddedResponse(MediaContainer={"numquam": 1}) - self.assertEqual(test_model.MediaContainer, {"numquam": 1}) + test_model = GetRecentlyAddedResponse(MediaContainer={"possimus": 4}) + self.assertEqual(test_model.MediaContainer, {"possimus": 4}) if __name__ == "__main__": diff --git a/test/models/test_get_search_results_response.py b/test/models/test_get_search_results_response.py index b85f45e..f6096bc 100644 --- a/test/models/test_get_search_results_response.py +++ b/test/models/test_get_search_results_response.py @@ -8,8 +8,8 @@ class TestGetSearchResultsResponseModel(unittest.TestCase): def test_get_search_results_response(self): # Create GetSearchResultsResponse class instance - test_model = GetSearchResultsResponse(MediaContainer={"eius": 4}) - self.assertEqual(test_model.MediaContainer, {"eius": 4}) + test_model = GetSearchResultsResponse(MediaContainer={"tenetur": 8}) + self.assertEqual(test_model.MediaContainer, {"tenetur": 8}) if __name__ == "__main__": diff --git a/test/models/test_get_server_activities_response.py b/test/models/test_get_server_activities_response.py index 81d6a8c..ebbb923 100644 --- a/test/models/test_get_server_activities_response.py +++ b/test/models/test_get_server_activities_response.py @@ -8,8 +8,8 @@ class TestGetServerActivitiesResponseModel(unittest.TestCase): def test_get_server_activities_response(self): # Create GetServerActivitiesResponse class instance - test_model = GetServerActivitiesResponse(MediaContainer={"quisquam": 5}) - self.assertEqual(test_model.MediaContainer, {"quisquam": 5}) + test_model = GetServerActivitiesResponse(MediaContainer={"enim": 8}) + self.assertEqual(test_model.MediaContainer, {"enim": 8}) if __name__ == "__main__": diff --git a/test/models/test_get_server_capabilities_response.py b/test/models/test_get_server_capabilities_response.py index 608fd48..cd250c1 100644 --- a/test/models/test_get_server_capabilities_response.py +++ b/test/models/test_get_server_capabilities_response.py @@ -10,8 +10,8 @@ class TestGetServerCapabilitiesResponseModel(unittest.TestCase): def test_get_server_capabilities_response(self): # Create GetServerCapabilitiesResponse class instance - test_model = GetServerCapabilitiesResponse(MediaContainer={"maiores": 3}) - self.assertEqual(test_model.MediaContainer, {"maiores": 3}) + test_model = GetServerCapabilitiesResponse(MediaContainer={"nam": 5}) + self.assertEqual(test_model.MediaContainer, {"nam": 5}) if __name__ == "__main__": diff --git a/test/models/test_get_server_identity_response.py b/test/models/test_get_server_identity_response.py index ba551bb..31d6c40 100644 --- a/test/models/test_get_server_identity_response.py +++ b/test/models/test_get_server_identity_response.py @@ -8,8 +8,8 @@ class TestGetServerIdentityResponseModel(unittest.TestCase): def test_get_server_identity_response(self): # Create GetServerIdentityResponse class instance - test_model = GetServerIdentityResponse(MediaContainer={"eum": 1}) - self.assertEqual(test_model.MediaContainer, {"eum": 1}) + test_model = GetServerIdentityResponse(MediaContainer={"similique": 3}) + self.assertEqual(test_model.MediaContainer, {"similique": 3}) if __name__ == "__main__": diff --git a/test/models/test_get_server_list_response.py b/test/models/test_get_server_list_response.py index 7a86879..0b0766b 100644 --- a/test/models/test_get_server_list_response.py +++ b/test/models/test_get_server_list_response.py @@ -8,8 +8,8 @@ class TestGetServerListResponseModel(unittest.TestCase): def test_get_server_list_response(self): # Create GetServerListResponse class instance - test_model = GetServerListResponse(MediaContainer={"asperiores": 6}) - self.assertEqual(test_model.MediaContainer, {"asperiores": 6}) + test_model = GetServerListResponse(MediaContainer={"dicta": 1}) + self.assertEqual(test_model.MediaContainer, {"dicta": 1}) if __name__ == "__main__": diff --git a/test/models/test_get_transcode_sessions_response.py b/test/models/test_get_transcode_sessions_response.py index bbeb5ce..e4d5fdb 100644 --- a/test/models/test_get_transcode_sessions_response.py +++ b/test/models/test_get_transcode_sessions_response.py @@ -8,8 +8,8 @@ class TestGetTranscodeSessionsResponseModel(unittest.TestCase): def test_get_transcode_sessions_response(self): # Create GetTranscodeSessionsResponse class instance - test_model = GetTranscodeSessionsResponse(MediaContainer={"eaque": 9}) - self.assertEqual(test_model.MediaContainer, {"eaque": 9}) + test_model = GetTranscodeSessionsResponse(MediaContainer={"ab": 3}) + self.assertEqual(test_model.MediaContainer, {"ab": 3}) if __name__ == "__main__": diff --git a/test/services/test_activities.py b/test/services/test_activities.py index bcf0d82..cb59a98 100644 --- a/test/services/test_activities.py +++ b/test/services/test_activities.py @@ -12,7 +12,7 @@ class TestActivities_(unittest.TestCase): @responses.activate def test_get_server_activities(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/activities", json={}, status=200) + responses.get("http://10.10.10.47:32400/activities", json={}, status=200) # call the method to test test_service = Activities("testkey") response = test_service.get_server_activities() @@ -22,7 +22,7 @@ class TestActivities_(unittest.TestCase): @responses.activate def test_get_server_activities_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/activities", json={}, status=404) + responses.get("http://10.10.10.47:32400/activities", json={}, status=404) with self.assertRaises(ClientException): test_service = Activities("testkey") test_service.get_server_activities() @@ -32,11 +32,11 @@ class TestActivities_(unittest.TestCase): def test_cancel_server_activities(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/activities/3963273161", json={}, status=200 + "http://10.10.10.47:32400/activities/9191455277", json={}, status=200 ) # call the method to test test_service = Activities("testkey") - response = test_service.cancel_server_activities("3963273161") + response = test_service.cancel_server_activities("9191455277") self.assertEqual(response.data, {}) responses.reset(), @@ -44,7 +44,7 @@ class TestActivities_(unittest.TestCase): def test_cancel_server_activities_required_fields_missing(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/activities/8877676477", json={}, status=202 + "http://10.10.10.47:32400/activities/6359244154", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Activities("testkey") @@ -55,11 +55,11 @@ class TestActivities_(unittest.TestCase): def test_cancel_server_activities_error_on_non_200(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/activities/6744354026", json={}, status=404 + "http://10.10.10.47:32400/activities/1590369420", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Activities("testkey") - test_service.cancel_server_activities("6744354026") + test_service.cancel_server_activities("1590369420") responses.reset() diff --git a/test/services/test_butler.py b/test/services/test_butler.py index 21afdac..1df9623 100644 --- a/test/services/test_butler.py +++ b/test/services/test_butler.py @@ -12,7 +12,7 @@ class TestButler_(unittest.TestCase): @responses.activate def test_get_butler_tasks(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/butler", json={}, status=200) + responses.get("http://10.10.10.47:32400/butler", json={}, status=200) # call the method to test test_service = Butler("testkey") response = test_service.get_butler_tasks() @@ -22,7 +22,7 @@ class TestButler_(unittest.TestCase): @responses.activate def test_get_butler_tasks_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/butler", json={}, status=404) + responses.get("http://10.10.10.47:32400/butler", json={}, status=404) with self.assertRaises(ClientException): test_service = Butler("testkey") test_service.get_butler_tasks() @@ -31,7 +31,7 @@ class TestButler_(unittest.TestCase): @responses.activate def test_start_all_tasks(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/butler", json={}, status=200) + responses.post("http://10.10.10.47:32400/butler", json={}, status=200) # call the method to test test_service = Butler("testkey") response = test_service.start_all_tasks() @@ -41,7 +41,7 @@ class TestButler_(unittest.TestCase): @responses.activate def test_start_all_tasks_error_on_non_200(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/butler", json={}, status=404) + responses.post("http://10.10.10.47:32400/butler", json={}, status=404) with self.assertRaises(ClientException): test_service = Butler("testkey") test_service.start_all_tasks() @@ -50,7 +50,7 @@ class TestButler_(unittest.TestCase): @responses.activate def test_stop_all_tasks(self): # Mock the API response - responses.delete("{protocol}://{ip}:{port}/butler", json={}, status=200) + responses.delete("http://10.10.10.47:32400/butler", json={}, status=200) # call the method to test test_service = Butler("testkey") response = test_service.stop_all_tasks() @@ -60,7 +60,7 @@ class TestButler_(unittest.TestCase): @responses.activate def test_stop_all_tasks_error_on_non_200(self): # Mock the API response - responses.delete("{protocol}://{ip}:{port}/butler", json={}, status=404) + responses.delete("http://10.10.10.47:32400/butler", json={}, status=404) with self.assertRaises(ClientException): test_service = Butler("testkey") test_service.stop_all_tasks() @@ -70,7 +70,7 @@ class TestButler_(unittest.TestCase): def test_start_task(self): # Mock the API response responses.post( - "{protocol}://{ip}:{port}/butler/BackupDatabase", json={}, status=200 + "http://10.10.10.47:32400/butler/BackupDatabase", json={}, status=200 ) # call the method to test test_service = Butler("testkey") @@ -82,7 +82,7 @@ class TestButler_(unittest.TestCase): def test_start_task_required_fields_missing(self): # Mock the API response responses.post( - "{protocol}://{ip}:{port}/butler/BackupDatabase", json={}, status=202 + "http://10.10.10.47:32400/butler/BackupDatabase", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Butler("testkey") @@ -93,7 +93,7 @@ class TestButler_(unittest.TestCase): def test_start_task_error_on_non_200(self): # Mock the API response responses.post( - "{protocol}://{ip}:{port}/butler/BackupDatabase", json={}, status=404 + "http://10.10.10.47:32400/butler/BackupDatabase", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Butler("testkey") @@ -104,7 +104,7 @@ class TestButler_(unittest.TestCase): def test_stop_task(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/butler/BackupDatabase", json={}, status=200 + "http://10.10.10.47:32400/butler/BackupDatabase", json={}, status=200 ) # call the method to test test_service = Butler("testkey") @@ -116,7 +116,7 @@ class TestButler_(unittest.TestCase): def test_stop_task_required_fields_missing(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/butler/BackupDatabase", json={}, status=202 + "http://10.10.10.47:32400/butler/BackupDatabase", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Butler("testkey") @@ -127,7 +127,7 @@ class TestButler_(unittest.TestCase): def test_stop_task_error_on_non_200(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/butler/BackupDatabase", json={}, status=404 + "http://10.10.10.47:32400/butler/BackupDatabase", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Butler("testkey") diff --git a/test/services/test_hubs.py b/test/services/test_hubs.py index 74e05e5..897db4a 100644 --- a/test/services/test_hubs.py +++ b/test/services/test_hubs.py @@ -12,31 +12,31 @@ class TestHubs_(unittest.TestCase): @responses.activate def test_get_global_hubs(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs", json={}, status=200) + responses.get("http://10.10.10.47:32400/hubs", json={}, status=200) # call the method to test test_service = Hubs("testkey") - response = test_service.get_global_hubs(8, 4) + response = test_service.get_global_hubs(2, 2) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_get_global_hubs_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs", json={}, status=404) + responses.get("http://10.10.10.47:32400/hubs", json={}, status=404) with self.assertRaises(ClientException): test_service = Hubs("testkey") - test_service.get_global_hubs(8, 3) + test_service.get_global_hubs(7, 5) responses.reset() @responses.activate def test_get_library_hubs(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/hubs/sections/3684333305", json={}, status=200 + "http://10.10.10.47:32400/hubs/sections/7302320686", json={}, status=200 ) # call the method to test test_service = Hubs("testkey") - response = test_service.get_library_hubs(3684333305, 2, 4) + response = test_service.get_library_hubs(7302320686, 4, 1) self.assertEqual(response.data, {}) responses.reset(), @@ -44,7 +44,7 @@ class TestHubs_(unittest.TestCase): def test_get_library_hubs_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/hubs/sections/2635728470", json={}, status=202 + "http://10.10.10.47:32400/hubs/sections/8066749835", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Hubs("testkey") @@ -55,11 +55,11 @@ class TestHubs_(unittest.TestCase): def test_get_library_hubs_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/hubs/sections/5770327453", json={}, status=404 + "http://10.10.10.47:32400/hubs/sections/4815305500", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Hubs("testkey") - test_service.get_library_hubs(5770327453, 9, 3) + test_service.get_library_hubs(4815305500, 9, 9) responses.reset() diff --git a/test/services/test_library.py b/test/services/test_library.py index 1ead67f..cda0fb7 100644 --- a/test/services/test_library.py +++ b/test/services/test_library.py @@ -12,17 +12,17 @@ class TestLibrary_(unittest.TestCase): @responses.activate def test_get_file_hash(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/hashes", json={}, status=200) + responses.get("http://10.10.10.47:32400/library/hashes", json={}, status=200) # call the method to test test_service = Library("testkey") - response = test_service.get_file_hash("asperiores", 7) + response = test_service.get_file_hash("harum", 3) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_get_file_hash_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/hashes", json={}, status=202) + responses.get("http://10.10.10.47:32400/library/hashes", json={}, status=202) with self.assertRaises(TypeError): test_service = Library("testkey") test_service.get_file_hash() @@ -31,17 +31,17 @@ class TestLibrary_(unittest.TestCase): @responses.activate def test_get_file_hash_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/hashes", json={}, status=404) + responses.get("http://10.10.10.47:32400/library/hashes", json={}, status=404) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_file_hash("cum", 4) + test_service.get_file_hash("debitis", 9) responses.reset() @responses.activate def test_get_recently_added(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/recentlyAdded", json={}, status=200 + "http://10.10.10.47:32400/library/recentlyAdded", json={}, status=200 ) # call the method to test test_service = Library("testkey") @@ -53,7 +53,7 @@ class TestLibrary_(unittest.TestCase): def test_get_recently_added_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/recentlyAdded", json={}, status=404 + "http://10.10.10.47:32400/library/recentlyAdded", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Library("testkey") @@ -63,7 +63,7 @@ class TestLibrary_(unittest.TestCase): @responses.activate def test_get_libraries(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/sections", json={}, status=200) + responses.get("http://10.10.10.47:32400/library/sections", json={}, status=200) # call the method to test test_service = Library("testkey") response = test_service.get_libraries() @@ -73,7 +73,7 @@ class TestLibrary_(unittest.TestCase): @responses.activate def test_get_libraries_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/sections", json={}, status=404) + responses.get("http://10.10.10.47:32400/library/sections", json={}, status=404) with self.assertRaises(ClientException): test_service = Library("testkey") test_service.get_libraries() @@ -83,11 +83,11 @@ class TestLibrary_(unittest.TestCase): def test_get_library(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/9871766595", json={}, status=200 + "http://10.10.10.47:32400/library/sections/1902657001", json={}, status=200 ) # call the method to test test_service = Library("testkey") - response = test_service.get_library(9871766595, 8) + response = test_service.get_library(1902657001, 6) self.assertEqual(response.data, {}) responses.reset(), @@ -95,7 +95,7 @@ class TestLibrary_(unittest.TestCase): def test_get_library_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/5100915384", json={}, status=202 + "http://10.10.10.47:32400/library/sections/3167481710", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Library("testkey") @@ -106,22 +106,22 @@ class TestLibrary_(unittest.TestCase): def test_get_library_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/6801308709", json={}, status=404 + "http://10.10.10.47:32400/library/sections/4877467839", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_library(6801308709, 3) + test_service.get_library(4877467839, 5) responses.reset() @responses.activate def test_delete_library(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/library/sections/3061349599", json={}, status=200 + "http://10.10.10.47:32400/library/sections/8087858304", json={}, status=200 ) # call the method to test test_service = Library("testkey") - response = test_service.delete_library(3061349599) + response = test_service.delete_library(8087858304) self.assertEqual(response.data, {}) responses.reset(), @@ -129,7 +129,7 @@ class TestLibrary_(unittest.TestCase): def test_delete_library_required_fields_missing(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/library/sections/6921817889", json={}, status=202 + "http://10.10.10.47:32400/library/sections/3795773112", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Library("testkey") @@ -140,24 +140,24 @@ class TestLibrary_(unittest.TestCase): def test_delete_library_error_on_non_200(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/library/sections/9683751588", json={}, status=404 + "http://10.10.10.47:32400/library/sections/6227875135", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.delete_library(9683751588) + test_service.delete_library(6227875135) responses.reset() @responses.activate def test_get_library_items(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/6582958821/all", + "http://10.10.10.47:32400/library/sections/6046339919/all", json={}, status=200, ) # call the method to test test_service = Library("testkey") - response = test_service.get_library_items(6582958821, 9, "quibusdam") + response = test_service.get_library_items(6046339919, 8, "error") self.assertEqual(response.data, {}) responses.reset(), @@ -165,7 +165,7 @@ class TestLibrary_(unittest.TestCase): def test_get_library_items_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/9837157577/all", + "http://10.10.10.47:32400/library/sections/4081463593/all", json={}, status=202, ) @@ -178,26 +178,26 @@ class TestLibrary_(unittest.TestCase): def test_get_library_items_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/2390106765/all", + "http://10.10.10.47:32400/library/sections/8084937448/all", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_library_items(2390106765, 1, "voluptas") + test_service.get_library_items(8084937448, 2, "sint") responses.reset() @responses.activate def test_refresh_library(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/6321566139/refresh", + "http://10.10.10.47:32400/library/sections/5454812191/refresh", json={}, status=200, ) # call the method to test test_service = Library("testkey") - response = test_service.refresh_library(6321566139) + response = test_service.refresh_library(5454812191) self.assertEqual(response.data, {}) responses.reset(), @@ -205,7 +205,7 @@ class TestLibrary_(unittest.TestCase): def test_refresh_library_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/1404494475/refresh", + "http://10.10.10.47:32400/library/sections/7285849503/refresh", json={}, status=202, ) @@ -218,26 +218,26 @@ class TestLibrary_(unittest.TestCase): def test_refresh_library_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/5664562376/refresh", + "http://10.10.10.47:32400/library/sections/3253419710/refresh", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.refresh_library(5664562376) + test_service.refresh_library(3253419710) responses.reset() @responses.activate def test_get_latest_library_items(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/7193296778/latest", + "http://10.10.10.47:32400/library/sections/5633500181/latest", json={}, status=200, ) # call the method to test test_service = Library("testkey") - response = test_service.get_latest_library_items(3, 7193296778, "optio") + response = test_service.get_latest_library_items(2, 5633500181, "similique") self.assertEqual(response.data, {}) responses.reset(), @@ -245,7 +245,7 @@ class TestLibrary_(unittest.TestCase): def test_get_latest_library_items_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/6458970563/latest", + "http://10.10.10.47:32400/library/sections/8744481339/latest", json={}, status=202, ) @@ -258,26 +258,26 @@ class TestLibrary_(unittest.TestCase): def test_get_latest_library_items_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/1032189612/latest", + "http://10.10.10.47:32400/library/sections/1338044693/latest", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_latest_library_items(9, 1032189612, "enim") + test_service.get_latest_library_items(4, 1338044693, "quo") responses.reset() @responses.activate def test_get_common_library_items(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/8358490584/common", + "http://10.10.10.47:32400/library/sections/3556695926/common", json={}, status=200, ) # call the method to test test_service = Library("testkey") - response = test_service.get_common_library_items(7, 8358490584, "sed") + response = test_service.get_common_library_items(7, 3556695926, "id") self.assertEqual(response.data, {}) responses.reset(), @@ -285,7 +285,7 @@ class TestLibrary_(unittest.TestCase): def test_get_common_library_items_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/6763505882/common", + "http://10.10.10.47:32400/library/sections/5226642550/common", json={}, status=202, ) @@ -298,24 +298,24 @@ class TestLibrary_(unittest.TestCase): def test_get_common_library_items_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/sections/8191586203/common", + "http://10.10.10.47:32400/library/sections/2153034771/common", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_common_library_items(2, 8191586203, "nobis") + test_service.get_common_library_items(2, 2153034771, "eos") responses.reset() @responses.activate def test_get_metadata(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/metadata/2", json={}, status=200 + "http://10.10.10.47:32400/library/metadata/5", json={}, status=200 ) # call the method to test test_service = Library("testkey") - response = test_service.get_metadata(2) + response = test_service.get_metadata(5) self.assertEqual(response.data, {}) responses.reset(), @@ -323,7 +323,7 @@ class TestLibrary_(unittest.TestCase): def test_get_metadata_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/metadata/3", json={}, status=202 + "http://10.10.10.47:32400/library/metadata/9", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Library("testkey") @@ -334,22 +334,22 @@ class TestLibrary_(unittest.TestCase): def test_get_metadata_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/metadata/5", json={}, status=404 + "http://10.10.10.47:32400/library/metadata/2", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_metadata(5) + test_service.get_metadata(2) responses.reset() @responses.activate def test_get_metadata_children(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/metadata/4/children", json={}, status=200 + "http://10.10.10.47:32400/library/metadata/7/children", json={}, status=200 ) # call the method to test test_service = Library("testkey") - response = test_service.get_metadata_children(4) + response = test_service.get_metadata_children(7) self.assertEqual(response.data, {}) responses.reset(), @@ -357,7 +357,7 @@ class TestLibrary_(unittest.TestCase): def test_get_metadata_children_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/metadata/2/children", json={}, status=202 + "http://10.10.10.47:32400/library/metadata/8/children", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Library("testkey") @@ -368,17 +368,17 @@ class TestLibrary_(unittest.TestCase): def test_get_metadata_children_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/library/metadata/9/children", json={}, status=404 + "http://10.10.10.47:32400/library/metadata/2/children", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Library("testkey") - test_service.get_metadata_children(9) + test_service.get_metadata_children(2) responses.reset() @responses.activate def test_get_on_deck(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/onDeck", json={}, status=200) + responses.get("http://10.10.10.47:32400/library/onDeck", json={}, status=200) # call the method to test test_service = Library("testkey") response = test_service.get_on_deck() @@ -388,7 +388,7 @@ class TestLibrary_(unittest.TestCase): @responses.activate def test_get_on_deck_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/library/onDeck", json={}, status=404) + responses.get("http://10.10.10.47:32400/library/onDeck", json={}, status=404) with self.assertRaises(ClientException): test_service = Library("testkey") test_service.get_on_deck() diff --git a/test/services/test_log.py b/test/services/test_log.py index 50e3733..2a92c23 100644 --- a/test/services/test_log.py +++ b/test/services/test_log.py @@ -12,17 +12,17 @@ class TestLog_(unittest.TestCase): @responses.activate def test_log_line(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/log", json={}, status=200) + responses.get("http://10.10.10.47:32400/log", json={}, status=200) # call the method to test test_service = Log("testkey") - response = test_service.log_line("adipisci", "reprehenderit", 1) + response = test_service.log_line("recusandae", "quos", 2) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_log_line_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/log", json={}, status=202) + responses.get("http://10.10.10.47:32400/log", json={}, status=202) with self.assertRaises(TypeError): test_service = Log("testkey") test_service.log_line() @@ -31,16 +31,16 @@ class TestLog_(unittest.TestCase): @responses.activate def test_log_line_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/log", json={}, status=404) + responses.get("http://10.10.10.47:32400/log", json={}, status=404) with self.assertRaises(ClientException): test_service = Log("testkey") - test_service.log_line("eaque", "ea", 4) + test_service.log_line("labore", "aliquid", 3) responses.reset() @responses.activate def test_log_multi_line(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/log", json={}, status=200) + responses.post("http://10.10.10.47:32400/log", json={}, status=200) # call the method to test test_service = Log("testkey") response = test_service.log_multi_line() @@ -50,7 +50,7 @@ class TestLog_(unittest.TestCase): @responses.activate def test_log_multi_line_error_on_non_200(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/log", json={}, status=404) + responses.post("http://10.10.10.47:32400/log", json={}, status=404) with self.assertRaises(ClientException): test_service = Log("testkey") test_service.log_multi_line() @@ -59,7 +59,7 @@ class TestLog_(unittest.TestCase): @responses.activate def test_enable_paper_trail(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/log/networked", json={}, status=200) + responses.get("http://10.10.10.47:32400/log/networked", json={}, status=200) # call the method to test test_service = Log("testkey") response = test_service.enable_paper_trail() @@ -69,7 +69,7 @@ class TestLog_(unittest.TestCase): @responses.activate def test_enable_paper_trail_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/log/networked", json={}, status=404) + responses.get("http://10.10.10.47:32400/log/networked", json={}, status=404) with self.assertRaises(ClientException): test_service = Log("testkey") test_service.enable_paper_trail() diff --git a/test/services/test_media.py b/test/services/test_media.py index cd0b8b4..e692372 100644 --- a/test/services/test_media.py +++ b/test/services/test_media.py @@ -12,17 +12,17 @@ class TestMedia_(unittest.TestCase): @responses.activate def test_mark_played(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/scrobble", json={}, status=200) + responses.get("http://10.10.10.47:32400/:/scrobble", json={}, status=200) # call the method to test test_service = Media("testkey") - response = test_service.mark_played(1) + response = test_service.mark_played(6) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_mark_played_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/scrobble", json={}, status=202) + responses.get("http://10.10.10.47:32400/:/scrobble", json={}, status=202) with self.assertRaises(TypeError): test_service = Media("testkey") test_service.mark_played() @@ -31,26 +31,26 @@ class TestMedia_(unittest.TestCase): @responses.activate def test_mark_played_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/scrobble", json={}, status=404) + responses.get("http://10.10.10.47:32400/:/scrobble", json={}, status=404) with self.assertRaises(ClientException): test_service = Media("testkey") - test_service.mark_played(9) + test_service.mark_played(8) responses.reset() @responses.activate def test_mark_unplayed(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/unscrobble", json={}, status=200) + responses.get("http://10.10.10.47:32400/:/unscrobble", json={}, status=200) # call the method to test test_service = Media("testkey") - response = test_service.mark_unplayed(9) + response = test_service.mark_unplayed(8) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_mark_unplayed_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/unscrobble", json={}, status=202) + responses.get("http://10.10.10.47:32400/:/unscrobble", json={}, status=202) with self.assertRaises(TypeError): test_service = Media("testkey") test_service.mark_unplayed() @@ -59,26 +59,26 @@ class TestMedia_(unittest.TestCase): @responses.activate def test_mark_unplayed_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/unscrobble", json={}, status=404) + responses.get("http://10.10.10.47:32400/:/unscrobble", json={}, status=404) with self.assertRaises(ClientException): test_service = Media("testkey") - test_service.mark_unplayed(7) + test_service.mark_unplayed(8) responses.reset() @responses.activate def test_update_play_progress(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/:/progress", json={}, status=200) + responses.post("http://10.10.10.47:32400/:/progress", json={}, status=200) # call the method to test test_service = Media("testkey") - response = test_service.update_play_progress("esse", 7, "nesciunt") + response = test_service.update_play_progress("eos", 6, "vitae") self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_update_play_progress_required_fields_missing(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/:/progress", json={}, status=202) + responses.post("http://10.10.10.47:32400/:/progress", json={}, status=202) with self.assertRaises(TypeError): test_service = Media("testkey") test_service.update_play_progress() @@ -87,10 +87,10 @@ class TestMedia_(unittest.TestCase): @responses.activate def test_update_play_progress_error_on_non_200(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/:/progress", json={}, status=404) + responses.post("http://10.10.10.47:32400/:/progress", json={}, status=404) with self.assertRaises(ClientException): test_service = Media("testkey") - test_service.update_play_progress("quo", 7, "dolorum") + test_service.update_play_progress("praesentium", 5, "asperiores") responses.reset() diff --git a/test/services/test_playlists.py b/test/services/test_playlists.py index 346718e..b26a4fc 100644 --- a/test/services/test_playlists.py +++ b/test/services/test_playlists.py @@ -12,11 +12,11 @@ class TestPlaylists_(unittest.TestCase): @responses.activate def test_create_playlist(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/playlists", json={}, status=200) + responses.post("http://10.10.10.47:32400/playlists", json={}, status=200) # call the method to test test_service = Playlists("testkey") response = test_service.create_playlist( - 8, "audio", "quasi", "alias", 5922730203 + 6, "audio", "similique", "corporis", 9231398604 ) self.assertEqual(response.data, {}) responses.reset(), @@ -24,7 +24,7 @@ class TestPlaylists_(unittest.TestCase): @responses.activate def test_create_playlist_required_fields_missing(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/playlists", json={}, status=202) + responses.post("http://10.10.10.47:32400/playlists", json={}, status=202) with self.assertRaises(TypeError): test_service = Playlists("testkey") test_service.create_playlist() @@ -33,40 +33,40 @@ class TestPlaylists_(unittest.TestCase): @responses.activate def test_create_playlist_error_on_non_200(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/playlists", json={}, status=404) + responses.post("http://10.10.10.47:32400/playlists", json={}, status=404) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.create_playlist(4, "audio", "nihil", "cumque", 5164878131) + test_service.create_playlist(3, "audio", "dolor", "eius", 2118287307) responses.reset() @responses.activate def test_get_playlists(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/playlists/all", json={}, status=200) + responses.get("http://10.10.10.47:32400/playlists/all", json={}, status=200) # call the method to test test_service = Playlists("testkey") - response = test_service.get_playlists("audio", 5) + response = test_service.get_playlists("audio", 7) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_get_playlists_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/playlists/all", json={}, status=404) + responses.get("http://10.10.10.47:32400/playlists/all", json={}, status=404) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.get_playlists("audio", 4) + test_service.get_playlists("audio", 7) responses.reset() @responses.activate def test_get_playlist(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/playlists/8961898762", json={}, status=200 + "http://10.10.10.47:32400/playlists/1365108722", json={}, status=200 ) # call the method to test test_service = Playlists("testkey") - response = test_service.get_playlist(8961898762) + response = test_service.get_playlist(1365108722) self.assertEqual(response.data, {}) responses.reset(), @@ -74,7 +74,7 @@ class TestPlaylists_(unittest.TestCase): def test_get_playlist_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/playlists/2350925795", json={}, status=202 + "http://10.10.10.47:32400/playlists/5774434055", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Playlists("testkey") @@ -85,22 +85,22 @@ class TestPlaylists_(unittest.TestCase): def test_get_playlist_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/playlists/7803831874", json={}, status=404 + "http://10.10.10.47:32400/playlists/9191760374", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.get_playlist(7803831874) + test_service.get_playlist(9191760374) responses.reset() @responses.activate def test_update_playlist(self): # Mock the API response responses.put( - "{protocol}://{ip}:{port}/playlists/4846174885", json={}, status=200 + "http://10.10.10.47:32400/playlists/5518621092", json={}, status=200 ) # call the method to test test_service = Playlists("testkey") - response = test_service.update_playlist(4846174885) + response = test_service.update_playlist(5518621092) self.assertEqual(response.data, {}) responses.reset(), @@ -108,7 +108,7 @@ class TestPlaylists_(unittest.TestCase): def test_update_playlist_required_fields_missing(self): # Mock the API response responses.put( - "{protocol}://{ip}:{port}/playlists/3217640966", json={}, status=202 + "http://10.10.10.47:32400/playlists/9186005034", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Playlists("testkey") @@ -119,22 +119,22 @@ class TestPlaylists_(unittest.TestCase): def test_update_playlist_error_on_non_200(self): # Mock the API response responses.put( - "{protocol}://{ip}:{port}/playlists/2969411689", json={}, status=404 + "http://10.10.10.47:32400/playlists/9820265225", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.update_playlist(2969411689) + test_service.update_playlist(9820265225) responses.reset() @responses.activate def test_delete_playlist(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/playlists/9157110662", json={}, status=200 + "http://10.10.10.47:32400/playlists/5260240376", json={}, status=200 ) # call the method to test test_service = Playlists("testkey") - response = test_service.delete_playlist(9157110662) + response = test_service.delete_playlist(5260240376) self.assertEqual(response.data, {}) responses.reset(), @@ -142,7 +142,7 @@ class TestPlaylists_(unittest.TestCase): def test_delete_playlist_required_fields_missing(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/playlists/9590435699", json={}, status=202 + "http://10.10.10.47:32400/playlists/1740225155", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Playlists("testkey") @@ -153,22 +153,22 @@ class TestPlaylists_(unittest.TestCase): def test_delete_playlist_error_on_non_200(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/playlists/7937977423", json={}, status=404 + "http://10.10.10.47:32400/playlists/6145805352", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.delete_playlist(7937977423) + test_service.delete_playlist(6145805352) responses.reset() @responses.activate def test_get_playlist_contents(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/playlists/5686140716/items", json={}, status=200 + "http://10.10.10.47:32400/playlists/2828620637/items", json={}, status=200 ) # call the method to test test_service = Playlists("testkey") - response = test_service.get_playlist_contents(8, 5686140716) + response = test_service.get_playlist_contents(9, 2828620637) self.assertEqual(response.data, {}) responses.reset(), @@ -176,7 +176,7 @@ class TestPlaylists_(unittest.TestCase): def test_get_playlist_contents_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/playlists/3666405994/items", json={}, status=202 + "http://10.10.10.47:32400/playlists/2652525666/items", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Playlists("testkey") @@ -187,24 +187,22 @@ class TestPlaylists_(unittest.TestCase): def test_get_playlist_contents_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/playlists/9239392917/items", json={}, status=404 + "http://10.10.10.47:32400/playlists/1352187138/items", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.get_playlist_contents(4, 9239392917) + test_service.get_playlist_contents(3, 1352187138) responses.reset() @responses.activate def test_add_playlist_contents(self): # Mock the API response responses.put( - "{protocol}://{ip}:{port}/playlists/2224463633/items", json={}, status=200 + "http://10.10.10.47:32400/playlists/9135301877/items", json={}, status=200 ) # call the method to test test_service = Playlists("testkey") - response = test_service.add_playlist_contents( - 7330486290, "provident", 2224463633 - ) + response = test_service.add_playlist_contents(3575196026, "sit", 9135301877) self.assertEqual(response.data, {}) responses.reset(), @@ -212,7 +210,7 @@ class TestPlaylists_(unittest.TestCase): def test_add_playlist_contents_required_fields_missing(self): # Mock the API response responses.put( - "{protocol}://{ip}:{port}/playlists/8938618789/items", json={}, status=202 + "http://10.10.10.47:32400/playlists/6481139604/items", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Playlists("testkey") @@ -223,22 +221,22 @@ class TestPlaylists_(unittest.TestCase): def test_add_playlist_contents_error_on_non_200(self): # Mock the API response responses.put( - "{protocol}://{ip}:{port}/playlists/7136237365/items", json={}, status=404 + "http://10.10.10.47:32400/playlists/2575042558/items", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.add_playlist_contents(3430294919, "aspernatur", 7136237365) + test_service.add_playlist_contents(6992293922, "excepturi", 2575042558) responses.reset() @responses.activate def test_clear_playlist_contents(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/playlists/6699998436/items", json={}, status=200 + "http://10.10.10.47:32400/playlists/5408893231/items", json={}, status=200 ) # call the method to test test_service = Playlists("testkey") - response = test_service.clear_playlist_contents(6699998436) + response = test_service.clear_playlist_contents(5408893231) self.assertEqual(response.data, {}) responses.reset(), @@ -246,7 +244,7 @@ class TestPlaylists_(unittest.TestCase): def test_clear_playlist_contents_required_fields_missing(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/playlists/1772875063/items", json={}, status=202 + "http://10.10.10.47:32400/playlists/1483530897/items", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Playlists("testkey") @@ -257,27 +255,27 @@ class TestPlaylists_(unittest.TestCase): def test_clear_playlist_contents_error_on_non_200(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/playlists/3406600816/items", json={}, status=404 + "http://10.10.10.47:32400/playlists/7836623831/items", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.clear_playlist_contents(3406600816) + test_service.clear_playlist_contents(7836623831) responses.reset() @responses.activate def test_upload_playlist(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/playlists/upload", json={}, status=200) + responses.post("http://10.10.10.47:32400/playlists/upload", json={}, status=200) # call the method to test test_service = Playlists("testkey") - response = test_service.upload_playlist(2, "dignissimos") + response = test_service.upload_playlist(6, "ipsam") self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_upload_playlist_required_fields_missing(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/playlists/upload", json={}, status=202) + responses.post("http://10.10.10.47:32400/playlists/upload", json={}, status=202) with self.assertRaises(TypeError): test_service = Playlists("testkey") test_service.upload_playlist() @@ -286,10 +284,10 @@ class TestPlaylists_(unittest.TestCase): @responses.activate def test_upload_playlist_error_on_non_200(self): # Mock the API response - responses.post("{protocol}://{ip}:{port}/playlists/upload", json={}, status=404) + responses.post("http://10.10.10.47:32400/playlists/upload", json={}, status=404) with self.assertRaises(ClientException): test_service = Playlists("testkey") - test_service.upload_playlist(5, "fugit") + test_service.upload_playlist(6, "animi") responses.reset() diff --git a/test/services/test_search.py b/test/services/test_search.py index af8038d..ff3801e 100644 --- a/test/services/test_search.py +++ b/test/services/test_search.py @@ -12,17 +12,17 @@ class TestSearch_(unittest.TestCase): @responses.activate def test_perform_search(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs/search", json={}, status=200) + responses.get("http://10.10.10.47:32400/hubs/search", json={}, status=200) # call the method to test test_service = Search("testkey") - response = test_service.perform_search("incidunt", 2233364198, 9) + response = test_service.perform_search("consequatur", 9679770792, 1) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_perform_search_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs/search", json={}, status=202) + responses.get("http://10.10.10.47:32400/hubs/search", json={}, status=202) with self.assertRaises(TypeError): test_service = Search("testkey") test_service.perform_search() @@ -31,26 +31,26 @@ class TestSearch_(unittest.TestCase): @responses.activate def test_perform_search_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs/search", json={}, status=404) + responses.get("http://10.10.10.47:32400/hubs/search", json={}, status=404) with self.assertRaises(ClientException): test_service = Search("testkey") - test_service.perform_search("molestias", 8612735357, 3) + test_service.perform_search("facere", 7396523904, 9) responses.reset() @responses.activate def test_perform_voice_search(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs/search/voice", json={}, status=200) + responses.get("http://10.10.10.47:32400/hubs/search/voice", json={}, status=200) # call the method to test test_service = Search("testkey") - response = test_service.perform_voice_search("numquam", 7139321773, 2) + response = test_service.perform_voice_search("ipsa", 7448923108, 3) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_perform_voice_search_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs/search/voice", json={}, status=202) + responses.get("http://10.10.10.47:32400/hubs/search/voice", json={}, status=202) with self.assertRaises(TypeError): test_service = Search("testkey") test_service.perform_voice_search() @@ -59,26 +59,26 @@ class TestSearch_(unittest.TestCase): @responses.activate def test_perform_voice_search_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/hubs/search/voice", json={}, status=404) + responses.get("http://10.10.10.47:32400/hubs/search/voice", json={}, status=404) with self.assertRaises(ClientException): test_service = Search("testkey") - test_service.perform_voice_search("maxime", 5682941219, 6) + test_service.perform_voice_search("tempore", 1862858310, 2) responses.reset() @responses.activate def test_get_search_results(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/search", json={}, status=200) + responses.get("http://10.10.10.47:32400/search", json={}, status=200) # call the method to test test_service = Search("testkey") - response = test_service.get_search_results("veritatis") + response = test_service.get_search_results("tempore") self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_get_search_results_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/search", json={}, status=202) + responses.get("http://10.10.10.47:32400/search", json={}, status=202) with self.assertRaises(TypeError): test_service = Search("testkey") test_service.get_search_results() @@ -87,10 +87,10 @@ class TestSearch_(unittest.TestCase): @responses.activate def test_get_search_results_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/search", json={}, status=404) + responses.get("http://10.10.10.47:32400/search", json={}, status=404) with self.assertRaises(ClientException): test_service = Search("testkey") - test_service.get_search_results("eaque") + test_service.get_search_results("accusantium") responses.reset() diff --git a/test/services/test_security.py b/test/services/test_security.py index 7988389..0415fc1 100644 --- a/test/services/test_security.py +++ b/test/services/test_security.py @@ -12,7 +12,7 @@ class TestSecurity_(unittest.TestCase): @responses.activate def test_get_transient_token(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/security/token", json={}, status=200) + responses.get("http://10.10.10.47:32400/security/token", json={}, status=200) # call the method to test test_service = Security("testkey") response = test_service.get_transient_token("all", "delegation") @@ -22,7 +22,7 @@ class TestSecurity_(unittest.TestCase): @responses.activate def test_get_transient_token_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/security/token", json={}, status=202) + responses.get("http://10.10.10.47:32400/security/token", json={}, status=202) with self.assertRaises(TypeError): test_service = Security("testkey") test_service.get_transient_token() @@ -31,7 +31,7 @@ class TestSecurity_(unittest.TestCase): @responses.activate def test_get_transient_token_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/security/token", json={}, status=404) + responses.get("http://10.10.10.47:32400/security/token", json={}, status=404) with self.assertRaises(ClientException): test_service = Security("testkey") test_service.get_transient_token("all", "delegation") @@ -41,11 +41,11 @@ class TestSecurity_(unittest.TestCase): def test_get_source_connection_information(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/security/resources", json={}, status=200 + "http://10.10.10.47:32400/security/resources", json={}, status=200 ) # call the method to test test_service = Security("testkey") - response = test_service.get_source_connection_information("provident") + response = test_service.get_source_connection_information("similique") self.assertEqual(response.data, {}) responses.reset(), @@ -53,7 +53,7 @@ class TestSecurity_(unittest.TestCase): def test_get_source_connection_information_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/security/resources", json={}, status=202 + "http://10.10.10.47:32400/security/resources", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Security("testkey") @@ -64,11 +64,11 @@ class TestSecurity_(unittest.TestCase): def test_get_source_connection_information_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/security/resources", json={}, status=404 + "http://10.10.10.47:32400/security/resources", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Security("testkey") - test_service.get_source_connection_information("molestiae") + test_service.get_source_connection_information("facere") responses.reset() diff --git a/test/services/test_server.py b/test/services/test_server.py index 0f468c2..a7b1939 100644 --- a/test/services/test_server.py +++ b/test/services/test_server.py @@ -12,7 +12,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_capabilities(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/", json={}, status=200) + responses.get("http://10.10.10.47:32400/", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_server_capabilities() @@ -22,7 +22,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_capabilities_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/", json={}, status=404) + responses.get("http://10.10.10.47:32400/", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_server_capabilities() @@ -31,7 +31,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_preferences(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/prefs", json={}, status=200) + responses.get("http://10.10.10.47:32400/:/prefs", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_server_preferences() @@ -41,7 +41,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_preferences_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/prefs", json={}, status=404) + responses.get("http://10.10.10.47:32400/:/prefs", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_server_preferences() @@ -50,7 +50,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_available_clients(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/clients", json={}, status=200) + responses.get("http://10.10.10.47:32400/clients", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_available_clients() @@ -60,7 +60,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_available_clients_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/clients", json={}, status=404) + responses.get("http://10.10.10.47:32400/clients", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_available_clients() @@ -69,7 +69,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_devices(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/devices", json={}, status=200) + responses.get("http://10.10.10.47:32400/devices", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_devices() @@ -79,7 +79,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_devices_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/devices", json={}, status=404) + responses.get("http://10.10.10.47:32400/devices", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_devices() @@ -88,7 +88,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_identity(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/identity", json={}, status=200) + responses.get("http://10.10.10.47:32400/identity", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_server_identity() @@ -98,7 +98,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_identity_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/identity", json={}, status=404) + responses.get("http://10.10.10.47:32400/identity", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_server_identity() @@ -107,7 +107,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_my_plex_account(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/myplex/account", json={}, status=200) + responses.get("http://10.10.10.47:32400/myplex/account", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_my_plex_account() @@ -117,7 +117,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_my_plex_account_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/myplex/account", json={}, status=404) + responses.get("http://10.10.10.47:32400/myplex/account", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_my_plex_account() @@ -126,17 +126,19 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_resized_photo(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/photo/:/transcode", json={}, status=200) + responses.get("http://10.10.10.47:32400/photo/:/transcode", json={}, status=200) # call the method to test test_service = Server("testkey") - response = test_service.get_resized_photo("saepe", 6, 6, 3, 4, 6, 6805299528) + response = test_service.get_resized_photo( + "exercitationem", 3, 7, 6, 4, 6, 8564501568 + ) self.assertEqual(response.data, {}) responses.reset(), @responses.activate def test_get_resized_photo_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/photo/:/transcode", json={}, status=202) + responses.get("http://10.10.10.47:32400/photo/:/transcode", json={}, status=202) with self.assertRaises(TypeError): test_service = Server("testkey") test_service.get_resized_photo() @@ -145,16 +147,16 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_resized_photo_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/photo/:/transcode", json={}, status=404) + responses.get("http://10.10.10.47:32400/photo/:/transcode", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") - test_service.get_resized_photo("asperiores", 3, 2, 3, 5, 4, 8443664162) + test_service.get_resized_photo("eos", 5, 4, 2, 3, 7, 1237684478) responses.reset() @responses.activate def test_get_server_list(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/servers", json={}, status=200) + responses.get("http://10.10.10.47:32400/servers", json={}, status=200) # call the method to test test_service = Server("testkey") response = test_service.get_server_list() @@ -164,7 +166,7 @@ class TestServer_(unittest.TestCase): @responses.activate def test_get_server_list_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/servers", json={}, status=404) + responses.get("http://10.10.10.47:32400/servers", json={}, status=404) with self.assertRaises(ClientException): test_service = Server("testkey") test_service.get_server_list() diff --git a/test/services/test_sessions.py b/test/services/test_sessions.py index 02bedcd..4f10b8c 100644 --- a/test/services/test_sessions.py +++ b/test/services/test_sessions.py @@ -12,7 +12,7 @@ class TestSessions_(unittest.TestCase): @responses.activate def test_get_sessions(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/status/sessions", json={}, status=200) + responses.get("http://10.10.10.47:32400/status/sessions", json={}, status=200) # call the method to test test_service = Sessions("testkey") response = test_service.get_sessions() @@ -22,7 +22,7 @@ class TestSessions_(unittest.TestCase): @responses.activate def test_get_sessions_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/status/sessions", json={}, status=404) + responses.get("http://10.10.10.47:32400/status/sessions", json={}, status=404) with self.assertRaises(ClientException): test_service = Sessions("testkey") test_service.get_sessions() @@ -32,7 +32,7 @@ class TestSessions_(unittest.TestCase): def test_get_session_history(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/status/sessions/history/all", json={}, status=200 + "http://10.10.10.47:32400/status/sessions/history/all", json={}, status=200 ) # call the method to test test_service = Sessions("testkey") @@ -44,7 +44,7 @@ class TestSessions_(unittest.TestCase): def test_get_session_history_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/status/sessions/history/all", json={}, status=404 + "http://10.10.10.47:32400/status/sessions/history/all", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Sessions("testkey") @@ -55,7 +55,7 @@ class TestSessions_(unittest.TestCase): def test_get_transcode_sessions(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/transcode/sessions", json={}, status=200 + "http://10.10.10.47:32400/transcode/sessions", json={}, status=200 ) # call the method to test test_service = Sessions("testkey") @@ -67,7 +67,7 @@ class TestSessions_(unittest.TestCase): def test_get_transcode_sessions_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/transcode/sessions", json={}, status=404 + "http://10.10.10.47:32400/transcode/sessions", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Sessions("testkey") @@ -78,11 +78,11 @@ class TestSessions_(unittest.TestCase): def test_stop_transcode_session(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/transcode/sessions/natus", json={}, status=200 + "http://10.10.10.47:32400/transcode/sessions/nostrum", json={}, status=200 ) # call the method to test test_service = Sessions("testkey") - response = test_service.stop_transcode_session("natus") + response = test_service.stop_transcode_session("nostrum") self.assertEqual(response.data, {}) responses.reset(), @@ -90,7 +90,9 @@ class TestSessions_(unittest.TestCase): def test_stop_transcode_session_required_fields_missing(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/transcode/sessions/iure", json={}, status=202 + "http://10.10.10.47:32400/transcode/sessions/blanditiis", + json={}, + status=202, ) with self.assertRaises(TypeError): test_service = Sessions("testkey") @@ -101,13 +103,11 @@ class TestSessions_(unittest.TestCase): def test_stop_transcode_session_error_on_non_200(self): # Mock the API response responses.delete( - "{protocol}://{ip}:{port}/transcode/sessions/praesentium", - json={}, - status=404, + "http://10.10.10.47:32400/transcode/sessions/quaerat", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Sessions("testkey") - test_service.stop_transcode_session("praesentium") + test_service.stop_transcode_session("quaerat") responses.reset() diff --git a/test/services/test_updater.py b/test/services/test_updater.py index 745cff9..1ccdb95 100644 --- a/test/services/test_updater.py +++ b/test/services/test_updater.py @@ -12,7 +12,7 @@ class TestUpdater_(unittest.TestCase): @responses.activate def test_get_update_status(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/updater/status", json={}, status=200) + responses.get("http://10.10.10.47:32400/updater/status", json={}, status=200) # call the method to test test_service = Updater("testkey") response = test_service.get_update_status() @@ -22,7 +22,7 @@ class TestUpdater_(unittest.TestCase): @responses.activate def test_get_update_status_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/updater/status", json={}, status=404) + responses.get("http://10.10.10.47:32400/updater/status", json={}, status=404) with self.assertRaises(ClientException): test_service = Updater("testkey") test_service.get_update_status() @@ -31,7 +31,7 @@ class TestUpdater_(unittest.TestCase): @responses.activate def test_check_for_updates(self): # Mock the API response - responses.put("{protocol}://{ip}:{port}/updater/check", json={}, status=200) + responses.put("http://10.10.10.47:32400/updater/check", json={}, status=200) # call the method to test test_service = Updater("testkey") response = test_service.check_for_updates("foo") @@ -41,7 +41,7 @@ class TestUpdater_(unittest.TestCase): @responses.activate def test_check_for_updates_error_on_non_200(self): # Mock the API response - responses.put("{protocol}://{ip}:{port}/updater/check", json={}, status=404) + responses.put("http://10.10.10.47:32400/updater/check", json={}, status=404) with self.assertRaises(ClientException): test_service = Updater("testkey") test_service.check_for_updates("foo") @@ -50,7 +50,7 @@ class TestUpdater_(unittest.TestCase): @responses.activate def test_apply_updates(self): # Mock the API response - responses.put("{protocol}://{ip}:{port}/updater/apply", json={}, status=200) + responses.put("http://10.10.10.47:32400/updater/apply", json={}, status=200) # call the method to test test_service = Updater("testkey") response = test_service.apply_updates("foo", "foo") @@ -60,7 +60,7 @@ class TestUpdater_(unittest.TestCase): @responses.activate def test_apply_updates_error_on_non_200(self): # Mock the API response - responses.put("{protocol}://{ip}:{port}/updater/apply", json={}, status=404) + responses.put("http://10.10.10.47:32400/updater/apply", json={}, status=404) with self.assertRaises(ClientException): test_service = Updater("testkey") test_service.apply_updates("foo", "foo") diff --git a/test/services/test_video.py b/test/services/test_video.py index ea245a3..0b6f07c 100644 --- a/test/services/test_video.py +++ b/test/services/test_video.py @@ -13,27 +13,27 @@ class TestVideo_(unittest.TestCase): def test_start_universal_transcode(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/video/:/transcode/universal/start.mpd", + "http://10.10.10.47:32400/video/:/transcode/universal/start.mpd", json={}, status=200, ) # call the method to test test_service = Video("testkey") response = test_service.start_universal_transcode( - "debitis", - 5, - 6, - "quos", - 1, - 2, - 2, - 5, - 7, - "maiores", - 4, - "fugit", + "sequi", 9, - "veritatis", + 2, + "molestiae", + 2, + 2, + 8, + 1, + 5, + "officiis", + 7, + "incidunt", + 1, + "iusto", 5, 3, ) @@ -44,7 +44,7 @@ class TestVideo_(unittest.TestCase): def test_start_universal_transcode_required_fields_missing(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/video/:/transcode/universal/start.mpd", + "http://10.10.10.47:32400/video/:/transcode/universal/start.mpd", json={}, status=202, ) @@ -57,40 +57,49 @@ class TestVideo_(unittest.TestCase): def test_start_universal_transcode_error_on_non_200(self): # Mock the API response responses.get( - "{protocol}://{ip}:{port}/video/:/transcode/universal/start.mpd", + "http://10.10.10.47:32400/video/:/transcode/universal/start.mpd", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Video("testkey") test_service.start_universal_transcode( - "quos", - 2, - 9, - "cupiditate", - 4, - 5, - 7, + "occaecati", 6, - 5, - "eligendi", 9, - "eum", - 9, - "veritatis", - 8, + "nobis", + 3, + 6, + 4, + 6, + 6, + "provident", 2, + "alias", + 8, + "eveniet", + 5, + 5, ) responses.reset() @responses.activate def test_get_timeline(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/timeline", json={}, status=200) + responses.get("http://10.10.10.47:32400/:/timeline", json={}, status=200) # call the method to test test_service = Video("testkey") response = test_service.get_timeline( - 1, 3, 4519717282, "neque optio ipsa aut est", 2, 6, 3, "playing", "aut", 6 + 6, + 8, + 9508994071, + "at temporibus dolorem non tempora", + 3, + 9, + 5, + "playing", + "itaque", + 4, ) self.assertEqual(response.data, {}) responses.reset(), @@ -98,7 +107,7 @@ class TestVideo_(unittest.TestCase): @responses.activate def test_get_timeline_required_fields_missing(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/timeline", json={}, status=202) + responses.get("http://10.10.10.47:32400/:/timeline", json={}, status=202) with self.assertRaises(TypeError): test_service = Video("testkey") test_service.get_timeline() @@ -107,20 +116,20 @@ class TestVideo_(unittest.TestCase): @responses.activate def test_get_timeline_error_on_non_200(self): # Mock the API response - responses.get("{protocol}://{ip}:{port}/:/timeline", json={}, status=404) + responses.get("http://10.10.10.47:32400/:/timeline", json={}, status=404) with self.assertRaises(ClientException): test_service = Video("testkey") test_service.get_timeline( - 9, - 1, - 6697392847, - "repellendus odio inventore dolore excepturi", - 6, - 4, - 4, + 2, + 5, + 6961336926, + "recusandae tempore ullam provident incidunt", + 7, + 5, + 2, "playing", - "recusandae", - 4, + "aliquid", + 9, ) responses.reset()