From 5b939e27cf23a8f4ab29e59d4044e87f4ae23ac7 Mon Sep 17 00:00:00 2001 From: Simon Weber Date: Sat, 9 Jan 2016 21:55:35 -0500 Subject: [PATCH] disable webclient tests [#395] --- gmusicapi/test/server_tests.py | 116 ++++++++++++++++----------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/gmusicapi/test/server_tests.py b/gmusicapi/test/server_tests.py index 4f45be6b..b5b0c11f 100644 --- a/gmusicapi/test/server_tests.py +++ b/gmusicapi/test/server_tests.py @@ -137,8 +137,8 @@ def mc_get_playlist_songs(self, plid): @before_class def login(self): - self.wc = test_utils.new_test_client(Webclient) - assert_true(self.wc.is_authenticated()) + # self.wc = test_utils.new_test_client(Webclient) + # assert_true(self.wc.is_authenticated()) self.mm = test_utils.new_test_client(Musicmanager) assert_true(self.mm.is_authenticated()) @@ -148,9 +148,9 @@ def login(self): @after_class(always_run=True) def logout(self): - if self.wc is None: - raise SkipTest('did not create wc') - assert_true(self.wc.logout()) + # if self.wc is None: + # raise SkipTest('did not create wc') + # assert_true(self.wc.logout()) if self.mm is None: raise SkipTest('did not create mm') @@ -272,7 +272,7 @@ def song_create(self): @test def playlist_create(self): mc_id = self.mc.create_playlist(TEST_PLAYLIST_NAME, "", public=True) - wc_id = self.wc.create_playlist(TEST_PLAYLIST_NAME, "", public=True) + # wc_id = self.wc.create_playlist(TEST_PLAYLIST_NAME, "", public=True) # like song_create, retry until the playlist appears @retry @@ -280,10 +280,10 @@ def assert_playlist_exists(plids): found = [p for p in self.mc.get_all_playlists() if p['id'] in plids] - assert_equal(len(found), 2) + assert_equal(len(found), 1) - assert_playlist_exists([mc_id, wc_id]) - self.playlist_ids = [mc_id, wc_id] + assert_playlist_exists([mc_id]) + self.playlist_ids = [mc_id] @test(depends_on=[playlist_create, song_create], runs_after_groups=['playlist.exists', 'song.exists']) @@ -417,7 +417,7 @@ def song_delete(self): # mc is the only to run if AA testing not enabled with Check() as check: for i, testsong in enumerate(self.all_songs): - if i % 2 == 0: + if True: res = self.mc.delete_songs(testsong.sid) else: with warnings.catch_warnings(): @@ -474,68 +474,68 @@ def assert_download(sid): # WC tests # --------- - @test - def wc_get_registered_devices(self): - # no logic; just checking schema - self.wc.get_registered_devices() + # @test + # def wc_get_registered_devices(self): + # # no logic; just checking schema + # self.wc.get_registered_devices() - @test - def wc_get_shared_playlist_info(self): - expected = { - u'author': u'gmusic api', - u'description': u'description here', - u'title': u'public title here', - u'num_tracks': 2 - } - - assert_equal( - self.wc.get_shared_playlist_info(TEST_PLAYLIST_SHARETOKEN), - expected - ) + # @test + # def wc_get_shared_playlist_info(self): + # expected = { + # u'author': u'gmusic api', + # u'description': u'description here', + # u'title': u'public title here', + # u'num_tracks': 2 + # } + + # assert_equal( + # self.wc.get_shared_playlist_info(TEST_PLAYLIST_SHARETOKEN), + # expected + # ) - @test - @all_access - def wc_get_aa_stream_urls(self): - urls = self.wc.get_stream_urls(TEST_AA_SONG_ID) + # @test + # @all_access + # def wc_get_aa_stream_urls(self): + # urls = self.wc.get_stream_urls(TEST_AA_SONG_ID) - assert_true(len(urls) > 1) + # assert_true(len(urls) > 1) - @test - @all_access - def wc_stream_aa_track_with_header(self): - audio = self.wc.get_stream_audio(TEST_AA_SONG_ID, use_range_header=True) + # @test + # @all_access + # def wc_stream_aa_track_with_header(self): + # audio = self.wc.get_stream_audio(TEST_AA_SONG_ID, use_range_header=True) - assert_equal(md5(audio).hexdigest(), TEST_AA_SONG_WC_HASH) + # assert_equal(md5(audio).hexdigest(), TEST_AA_SONG_WC_HASH) - @test - @all_access - def wc_stream_aa_track_without_header(self): - audio = self.wc.get_stream_audio(TEST_AA_SONG_ID, use_range_header=False) + # @test + # @all_access + # def wc_stream_aa_track_without_header(self): + # audio = self.wc.get_stream_audio(TEST_AA_SONG_ID, use_range_header=False) - assert_equal(md5(audio).hexdigest(), TEST_AA_SONG_WC_HASH) + # assert_equal(md5(audio).hexdigest(), TEST_AA_SONG_WC_HASH) - @song_test - def wc_get_download_info(self): - url, download_count = self.wc.get_song_download_info(self.user_songs[0].sid) + # @song_test + # def wc_get_download_info(self): + # url, download_count = self.wc.get_song_download_info(self.user_songs[0].sid) - assert_is_not_none(url) + # assert_is_not_none(url) - @song_test - def wc_get_uploaded_stream_urls(self): - urls = self.wc.get_stream_urls(self.user_songs[0].sid) + # @song_test + # def wc_get_uploaded_stream_urls(self): + # urls = self.wc.get_stream_urls(self.user_songs[0].sid) - assert_equal(len(urls), 1) + # assert_equal(len(urls), 1) - url = urls[0] + # url = urls[0] - assert_is_not_none(url) - assert_equal(url.split(':')[0], 'https') + # assert_is_not_none(url) + # assert_equal(url.split(':')[0], 'https') - @song_test - def wc_upload_album_art(self): - url = self.wc.upload_album_art(self.user_songs[0].sid, test_utils.image_filename) - assert_equal(url[:4], 'http') - # TODO download the track and verify the metadata changed + # @song_test + # def wc_upload_album_art(self): + # url = self.wc.upload_album_art(self.user_songs[0].sid, test_utils.image_filename) + # assert_equal(url[:4], 'http') + # # TODO download the track and verify the metadata changed # --------- # MC tests