From a7d9d02f41dfa5f2d30a2df105171eb32f7f1b87 Mon Sep 17 00:00:00 2001 From: Marshal Date: Sun, 29 Dec 2019 10:38:24 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D1=81=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=87=D0=B5=D0=B9=20=D0=BF=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D0=B3=D0=BE=20=D1=81=D0=BB=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D1=80=D1=8F=20=D0=B2=20de=5Fjson=20=D0=BA=D0=B0=D0=B6=D0=B4?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0=20#17?= =?UTF-8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_account.py | 3 +++ tests/test_ad_params.py | 3 +++ tests/test_album.py | 3 +++ tests/test_album_event.py | 3 +++ tests/test_albums_likes.py | 3 +++ tests/test_artist.py | 3 +++ tests/test_artist_albums.py | 3 +++ tests/test_artist_event.py | 3 +++ tests/test_artist_tracks.py | 3 +++ tests/test_artists_likes.py | 3 +++ tests/test_auto_renewable.py | 3 +++ tests/test_best.py | 3 +++ tests/test_block.py | 3 +++ tests/test_block_entity.py | 7 +++++-- tests/test_brief_info.py | 3 +++ tests/test_case_forms.py | 3 +++ tests/test_chart.py | 3 +++ tests/test_chart_item.py | 3 +++ tests/test_counts.py | 3 +++ tests/test_cover.py | 3 +++ tests/test_dashboard.py | 3 +++ tests/test_day.py | 3 +++ tests/test_description.py | 3 +++ tests/test_discrete_scale.py | 3 +++ tests/test_download_info.py | 3 +++ tests/test_enum.py | 3 +++ tests/test_event.py | 3 +++ tests/test_feed.py | 3 +++ tests/test_generated_playlist.py | 3 +++ tests/test_genre.py | 3 +++ tests/test_icon.py | 3 +++ tests/test_id.py | 3 +++ tests/test_images.py | 3 +++ tests/test_invocation_info.py | 3 +++ tests/test_label.py | 3 +++ tests/test_landing.py | 3 +++ tests/test_link.py | 3 +++ tests/test_lyrics.py | 3 +++ tests/test_made_for.py | 3 +++ tests/test_major.py | 3 +++ tests/test_mix_link.py | 3 +++ tests/test_normalization.py | 3 +++ tests/test_pager.py | 3 +++ tests/test_passport_phone.py | 3 +++ tests/test_permission_alerts.py | 3 +++ tests/test_permissions.py | 3 +++ tests/test_personal_playlists_data.py | 3 +++ tests/test_play_context.py | 3 +++ tests/test_play_contexts_data.py | 3 +++ tests/test_play_counter.py | 3 +++ tests/test_playlist.py | 3 +++ tests/test_playlist_absence.py | 3 +++ tests/test_playlist_id.py | 3 +++ tests/test_playlists_likes.py | 3 +++ tests/test_plus.py | 3 +++ tests/test_price.py | 3 +++ tests/test_product.py | 3 +++ tests/test_promo_code_status.py | 3 +++ tests/test_promotion.py | 3 +++ tests/test_ratings.py | 3 +++ tests/test_restrictions.py | 3 +++ tests/test_rotor_settings.py | 3 +++ tests/test_search.py | 3 +++ tests/test_search_result.py | 3 +++ tests/test_sequence.py | 3 +++ tests/test_settings.py | 3 +++ tests/test_station.py | 3 +++ tests/test_station_result.py | 3 +++ tests/test_station_tracks_result.py | 3 +++ tests/test_status.py | 3 +++ tests/test_subscription.py | 3 +++ tests/test_suggestions.py | 3 +++ tests/test_supplement.py | 3 +++ tests/test_title.py | 3 +++ tests/test_track.py | 3 +++ tests/test_track_id.py | 3 +++ tests/test_track_position.py | 3 +++ tests/test_track_short.py | 3 +++ tests/test_track_short_old.py | 3 +++ tests/test_track_with_ads.py | 3 +++ tests/test_tracks_list.py | 3 +++ tests/test_user.py | 3 +++ tests/test_value.py | 3 +++ tests/test_video.py | 3 +++ tests/test_video_supplement.py | 3 +++ tests/test_vinyl.py | 3 +++ 86 files changed, 260 insertions(+), 2 deletions(-) diff --git a/tests/test_account.py b/tests/test_account.py index 88a91d5..2175478 100644 --- a/tests/test_account.py +++ b/tests/test_account.py @@ -32,6 +32,9 @@ class TestAccount: assert account.registered_at == self.registered_at assert account.has_info_for_app_metrica == self.has_info_for_app_metrica + def test_de_json_none(self, client): + assert Account.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'now': self.now, 'service_available': self.service_available} account = Account.de_json(json_dict, client) diff --git a/tests/test_ad_params.py b/tests/test_ad_params.py index 7639cc2..ad7eb3e 100644 --- a/tests/test_ad_params.py +++ b/tests/test_ad_params.py @@ -21,6 +21,9 @@ class TestAdParams: assert ad_params.genre_id == self.genre_id assert ad_params.genre_name == self.genre_name + def test_de_json_none(self, client): + assert AdParams.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'partner_id': self.partner_id, 'category_id': self.category_id, 'page_ref': self.page_ref, 'target_ref': self.target_ref, 'other_params': self.other_params, 'ad_volume': self.ad_volume} diff --git a/tests/test_album.py b/tests/test_album.py index 0cf3230..39db295 100644 --- a/tests/test_album.py +++ b/tests/test_album.py @@ -51,6 +51,9 @@ class TestAlbum: assert album.track_position == track_position assert album.regions == self.regions + def test_de_json_none(self, client): + assert Album.de_json({}, client) is None + def test_de_json_required(self, client, artist, label): json_dict = {'id_': self.id, 'title': self.title, 'cover_uri': self.cover_uri, 'track_count': self.track_count, 'artists': [artist.to_dict()], 'labels': [label.to_dict()], diff --git a/tests/test_album_event.py b/tests/test_album_event.py index b1e766d..fd99d19 100644 --- a/tests/test_album_event.py +++ b/tests/test_album_event.py @@ -6,6 +6,9 @@ class TestAlbumEvent: assert album_event.album == album assert album_event.tracks == [track] + def test_de_json_none(self, client): + assert AlbumEvent.de_json({}, client) is None + def test_de_json_required(self, client, album, track): json_dict = {'album': album.to_dict(), 'tracks': [track.to_dict()]} album_event = AlbumEvent.de_json(json_dict, client) diff --git a/tests/test_albums_likes.py b/tests/test_albums_likes.py index 76f7bad..b797c45 100644 --- a/tests/test_albums_likes.py +++ b/tests/test_albums_likes.py @@ -17,6 +17,9 @@ class TestAlbumsLikes: assert albums_likes.id == self.id assert albums_likes.album == album + def test_de_json_none(self, client): + assert AlbumsLikes.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'timestamp': self.timestamp} albums_likes = AlbumsLikes.de_json(json_dict, client) diff --git a/tests/test_artist.py b/tests/test_artist.py index 0689c7f..68f80fd 100644 --- a/tests/test_artist.py +++ b/tests/test_artist.py @@ -49,6 +49,9 @@ class TestArtist: assert artist.init_date == self.init_date assert artist.end_date == self.end_date + def test_de_json_none(self, client): + assert Artist.de_json({}, client) is None + def test_de_json_required(self, client, cover): json_dict = {'id_': self.id, 'name': self.name, 'cover': cover.to_dict()} artist = Artist.de_json(json_dict, client) diff --git a/tests/test_artist_albums.py b/tests/test_artist_albums.py index 5b86469..471d116 100644 --- a/tests/test_artist_albums.py +++ b/tests/test_artist_albums.py @@ -13,6 +13,9 @@ class TestArtistAlbums: assert artist_albums.albums == [album] assert artist_albums.pager == pager + def test_de_json_none(self, client): + assert ArtistAlbums.de_json({}, client) is None + def test_de_json_required(self, client, album, pager): json_dict = {'albums': [album.to_dict()], 'pager': pager.to_dict()} artist_albums = ArtistAlbums.de_json(json_dict, client) diff --git a/tests/test_artist_event.py b/tests/test_artist_event.py index efdd73a..ab9a737 100644 --- a/tests/test_artist_event.py +++ b/tests/test_artist_event.py @@ -7,6 +7,9 @@ class TestArtistEvent: assert artist_event.tracks == [track] assert artist_event.similar_to_artists_from_history == [artist] + def test_de_json_none(self, client): + assert ArtistEvent.de_json({}, client) is None + def test_de_json_required(self, client, artist, track): json_dict = {'artist': artist.to_dict(), 'tracks': [track.to_dict()], 'similar_to_artists_from_history': [artist.to_dict()]} diff --git a/tests/test_artist_tracks.py b/tests/test_artist_tracks.py index 9e7bdc1..2d684f1 100644 --- a/tests/test_artist_tracks.py +++ b/tests/test_artist_tracks.py @@ -13,6 +13,9 @@ class TestArtistTracks: assert artist_tracks.tracks == [track] assert artist_tracks.pager == pager + def test_de_json_none(self, client): + assert ArtistTracks.de_json({}, client) is None + def test_de_json_required(self, client, track, pager): json_dict = {'tracks': [track.to_dict()], 'pager': pager.to_dict()} artist_tracks = ArtistTracks.de_json(json_dict, client) diff --git a/tests/test_artists_likes.py b/tests/test_artists_likes.py index ccccaea..572ebcc 100644 --- a/tests/test_artists_likes.py +++ b/tests/test_artists_likes.py @@ -17,6 +17,9 @@ class TestArtistsLikes: assert artists_likes.artist == artist assert artists_likes.timestamp == self.timestamp + def test_de_json_none(self, client): + assert ArtistsLikes.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {} artists_likes = ArtistsLikes.de_json(json_dict, client) diff --git a/tests/test_auto_renewable.py b/tests/test_auto_renewable.py index bb38087..4a6cad0 100644 --- a/tests/test_auto_renewable.py +++ b/tests/test_auto_renewable.py @@ -18,6 +18,9 @@ class TestAutoRenewable: assert auto_renewable.finished == self.finished assert auto_renewable.order_id == self.order_id + def test_de_json_none(self, client): + assert AutoRenewable.de_json({}, client) is None + def test_de_json_required(self, client, product): json_dict = {'expires': self.expires, 'vendor': self.vendor, 'vendor_help_url': self.vendor_help_url, 'product_id': self.product_id, 'product': product.to_dict(), 'finished': self.finished} diff --git a/tests/test_best.py b/tests/test_best.py index bf5651a..86681cb 100644 --- a/tests/test_best.py +++ b/tests/test_best.py @@ -12,6 +12,9 @@ class TestBest: assert best.result == result assert best.text == self.text + def test_de_json_none(self, client): + assert Best.de_json({}, client) is None + def test_de_json_required(self, client, best_with_result): best_fixture, result = best_with_result diff --git a/tests/test_block.py b/tests/test_block.py index 48e7596..5d68200 100644 --- a/tests/test_block.py +++ b/tests/test_block.py @@ -27,6 +27,9 @@ class TestBlock: assert block.description == self.description assert block.data == data + def test_de_json_none(self, client): + assert Block.de_json({}, client) is None + def test_de_json_required(self, client, block_entity): json_dict = {'id_': self.id, 'type_': self.type, 'type_for_from': self.type_for_from, 'title': self.title, 'entities': [block_entity.to_dict()]} diff --git a/tests/test_block_entity.py b/tests/test_block_entity.py index ec67302..e2bb843 100644 --- a/tests/test_block_entity.py +++ b/tests/test_block_entity.py @@ -19,12 +19,15 @@ class TestBlockEntity: type = 'personal-playlist' def test_expected_values(self, block_entity_with_data_and_type): - block_entity, data, type = block_entity_with_data_and_type + block_entity, data, type_ = block_entity_with_data_and_type assert block_entity.id == self.id - assert block_entity.type == type + assert block_entity.type == type_ assert block_entity.data == data + def test_de_json_none(self, client): + assert BlockEntity.de_json({}, client) is None + def test_de_json_required(self, client, block_entity_data_with_type): data, type_ = block_entity_data_with_type diff --git a/tests/test_brief_info.py b/tests/test_brief_info.py index c9125cd..eb60816 100644 --- a/tests/test_brief_info.py +++ b/tests/test_brief_info.py @@ -29,6 +29,9 @@ class TestBriefInfo: assert brief_info.playlist_ids == [playlist_id] assert brief_info.tracks_in_chart == [chart] + def test_de_json_none(self, client): + assert BriefInfo.de_json({}, client) is None + def test_de_json_required(self, client, artist, track, album, cover, playlist_id, video, vinyl): json_dict = {'artist': artist.to_dict(), 'albums': [album.to_dict()], 'also_albums': [album.to_dict()], 'last_release_ids': self.last_release_ids, 'popular_tracks': [track.to_dict()], diff --git a/tests/test_case_forms.py b/tests/test_case_forms.py index 8837ce4..04b3193 100644 --- a/tests/test_case_forms.py +++ b/tests/test_case_forms.py @@ -17,6 +17,9 @@ class TestCaseForms: assert case_forms.instrumental == self.instrumental assert case_forms.prepositional == self.prepositional + def test_de_json_none(self, client): + assert CaseForms.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'nominative': self.nominative, 'genitive': self.genitive, 'dative': self.dative, 'accusative': self.accusative, 'instrumental': self.instrumental, diff --git a/tests/test_chart.py b/tests/test_chart.py index 1b49433..0ebbbb8 100644 --- a/tests/test_chart.py +++ b/tests/test_chart.py @@ -14,6 +14,9 @@ class TestChart: assert chart.shift == self.shift assert chart.track_id == track_id + def test_de_json_none(self, client): + assert Chart.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'position': self.position, 'progress': self.progress, 'listeners': self.listeners, 'shift': self.shift} diff --git a/tests/test_chart_item.py b/tests/test_chart_item.py index c65b932..3332790 100644 --- a/tests/test_chart_item.py +++ b/tests/test_chart_item.py @@ -6,6 +6,9 @@ class TestChartItem: assert chart_item.track == track assert chart_item.chart == chart + def test_de_json_none(self, client): + assert ChartItem.de_json({}, client) is None + def test_de_json_required(self, client, track, chart): json_dict = {'track': track.to_dict(), 'chart': chart.to_dict()} chart_item = ChartItem.de_json(json_dict, client) diff --git a/tests/test_counts.py b/tests/test_counts.py index 2459234..d1c42c2 100644 --- a/tests/test_counts.py +++ b/tests/test_counts.py @@ -13,6 +13,9 @@ class TestCounts: assert counts.also_albums == self.also_albums assert counts.also_tracks == self.also_tracks + def test_de_json_none(self, client): + assert Counts.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'tracks': self.tracks, 'direct_albums': self.direct_albums, 'also_albums': self.also_albums, 'also_tracks': self.also_tracks} diff --git a/tests/test_cover.py b/tests/test_cover.py index c4b0f46..3fcac86 100644 --- a/tests/test_cover.py +++ b/tests/test_cover.py @@ -21,6 +21,9 @@ class TestCover: assert cover.prefix == self.prefix assert cover.error == self.error + def test_de_json_none(self, client): + assert Cover.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {} cover = Cover.de_json(json_dict, client) diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py index 8ad4cc9..c94fb9a 100644 --- a/tests/test_dashboard.py +++ b/tests/test_dashboard.py @@ -17,6 +17,9 @@ class TestDashboard: assert dashboard.stations == [station_result] assert dashboard.pumpkin == self.pumpkin + def test_de_json_none(self, client): + assert Dashboard.de_json({}, client) is None + def test_de_json_required(self, client, station_result): json_dict = {'dashboard_id': self.dashboard_id, 'stations': [station_result.to_dict()], 'pumpkin': self.pumpkin} dashboard = Dashboard.de_json(json_dict, client) diff --git a/tests/test_day.py b/tests/test_day.py index 2b82e25..0a3c04b 100644 --- a/tests/test_day.py +++ b/tests/test_day.py @@ -10,6 +10,9 @@ class TestDay: assert day.tracks_to_play_with_ads == [track_with_ads] assert day.tracks_to_play == [track] + def test_de_json_none(self, client): + assert Day.de_json({}, client) is None + def test_de_json_required(self, client, event, track_with_ads, track): json_dict = {'day': self.day, 'events': [event.to_dict()], 'tracks_to_play_with_ads': [track_with_ads.to_dict()], 'tracks_to_play': [track.to_dict()]} diff --git a/tests/test_description.py b/tests/test_description.py index ef7572d..4975285 100644 --- a/tests/test_description.py +++ b/tests/test_description.py @@ -11,6 +11,9 @@ class TestDescription: assert description.text == self.text assert description.url == self.url + def test_de_json_none(self, client): + assert Description.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'text': self.text, 'url': self.url} description = Description.de_json(json_dict, client) diff --git a/tests/test_discrete_scale.py b/tests/test_discrete_scale.py index 6a413c5..8ebe018 100644 --- a/tests/test_discrete_scale.py +++ b/tests/test_discrete_scale.py @@ -11,6 +11,9 @@ class TestDiscreteScale: assert discrete_scale.min == value assert discrete_scale.max == value + def test_de_json_none(self, client): + assert DiscreteScale.de_json({}, client) is None + def test_de_json_required(self, client, value): json_dict = {'type_': self.type, 'name': self.name, 'min_': value.to_dict(), 'max_': value.to_dict()} discrete_scale = DiscreteScale.de_json(json_dict, client) diff --git a/tests/test_download_info.py b/tests/test_download_info.py index 3908038..d86a9d4 100644 --- a/tests/test_download_info.py +++ b/tests/test_download_info.py @@ -24,6 +24,9 @@ class TestDownloadInfo: assert download_info.preview == self.preview assert download_info.download_info_url == self.download_info_url + def test_de_json_none(self, client): + assert DownloadInfo.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'codec': self.codec, 'bitrate_in_kbps': self.bitrate_in_kbps, 'gain': self.gain, 'preview': self.preview, 'download_info_url': self.download_info_url} diff --git a/tests/test_enum.py b/tests/test_enum.py index 16b3097..4d0f95c 100644 --- a/tests/test_enum.py +++ b/tests/test_enum.py @@ -10,6 +10,9 @@ class TestEnum: assert enum.name == self.name assert enum.possible_values == [value] + def test_de_json_none(self, client): + assert Enum.de_json({}, client) is None + def test_de_json_required(self, client, value): json_dict = {'type_': self.type, 'name': self.name, 'possible_values': [value.to_dict()]} enum = Enum.de_json(json_dict, client) diff --git a/tests/test_event.py b/tests/test_event.py index 492068d..14454ad 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -22,6 +22,9 @@ class TestEvent: assert event.device == self.device assert event.tracks_count == self.tracks_count + def test_de_json_none(self, client): + assert Event.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'type_': self.type} event = Event.de_json(json_dict, client) diff --git a/tests/test_feed.py b/tests/test_feed.py index cb951ff..458a39f 100644 --- a/tests/test_feed.py +++ b/tests/test_feed.py @@ -27,6 +27,9 @@ class TestFeed: assert feed.days == [day] assert feed.next_revision == self.next_revision + def test_de_json_none(self, client): + assert Feed.de_json({}, client) is None + def test_de_json_required(self, client, generated_playlist, day): json_dict = {'can_get_more_events': self.can_get_more_events, 'pumpkin': self.pumpkin, 'is_wizard_passed': self.is_wizard_passed, 'generated_playlists': [generated_playlist.to_dict()], diff --git a/tests/test_generated_playlist.py b/tests/test_generated_playlist.py index 44c9db4..a26e575 100644 --- a/tests/test_generated_playlist.py +++ b/tests/test_generated_playlist.py @@ -12,6 +12,9 @@ class TestGeneratedPlaylist: assert generated_playlist.notify == self.notify assert generated_playlist.data == playlist + def test_de_json_none(self, client): + assert GeneratedPlaylist.de_json({}, client) is None + def test_de_json_required(self, client, playlist): json_dict = {'type_': self.type, 'ready': self.ready, 'notify': self.notify, 'data': playlist.to_dict()} generated_playlist = GeneratedPlaylist.de_json(json_dict, client) diff --git a/tests/test_genre.py b/tests/test_genre.py index ed2f100..3450bd4 100644 --- a/tests/test_genre.py +++ b/tests/test_genre.py @@ -42,6 +42,9 @@ class TestGenre: assert genre.sub_genres == [genre_without_sub_genre] assert genre.hide_in_regions == self.hide_in_regions + def test_de_json_none(self, client): + assert Genre.de_json({}, client) is None + def test_de_json_required(self, client, title, images): json_dict = {'id_': self.id, 'weight': self.weight, 'composer_top': self.composer_top, 'title': self.title, 'titles': {'uz': title.to_dict()}, 'images': images.to_dict(), 'show_in_menu': self.show_in_menu} diff --git a/tests/test_icon.py b/tests/test_icon.py index 76aafdb..edde36c 100644 --- a/tests/test_icon.py +++ b/tests/test_icon.py @@ -9,6 +9,9 @@ class TestIcon: assert icon.background_color == self.background_color assert icon.image_url == self.image_url + def test_de_json_none(self, client): + assert Icon.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'background_color': self.background_color, 'image_url': self.image_url} icon = Icon.de_json(json_dict, client) diff --git a/tests/test_id.py b/tests/test_id.py index 5237b4d..b017fd2 100644 --- a/tests/test_id.py +++ b/tests/test_id.py @@ -9,6 +9,9 @@ class TestId: assert id_.type == self.type assert id_.tag == self.tag + def test_de_json_none(self, client): + assert Id.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'type_': self.type, 'tag': self.tag} id_ = Id.de_json(json_dict, client) diff --git a/tests/test_images.py b/tests/test_images.py index 3b70cd1..320e7d1 100644 --- a/tests/test_images.py +++ b/tests/test_images.py @@ -9,6 +9,9 @@ class TestImages: assert images._208x208 == self._208x208 assert images._300x300 == self._300x300 + def test_de_json_none(self, client): + assert Images.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {} images = Images.de_json(json_dict, client) diff --git a/tests/test_invocation_info.py b/tests/test_invocation_info.py index f96fc3b..5de2622 100644 --- a/tests/test_invocation_info.py +++ b/tests/test_invocation_info.py @@ -11,6 +11,9 @@ class TestInvocationInfo: assert invocation_info.req_id == self.req_id assert invocation_info.exec_duration_millis == self.exec_duration_millis + def test_de_json_none(self, client): + assert InvocationInfo.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'hostname': self.hostname, 'req_id': self.req_id} invocation_info = InvocationInfo.de_json(json_dict, client) diff --git a/tests/test_label.py b/tests/test_label.py index 8ff7914..b46e4a0 100644 --- a/tests/test_label.py +++ b/tests/test_label.py @@ -9,6 +9,9 @@ class TestLabel: assert label.id == self.id assert label.name == self.name + def test_de_json_none(self, client): + assert Label.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'name': self.name} label = Label.de_json(json_dict, client) diff --git a/tests/test_landing.py b/tests/test_landing.py index 8386f30..1b7dc25 100644 --- a/tests/test_landing.py +++ b/tests/test_landing.py @@ -17,6 +17,9 @@ class TestLanding: assert landing.content_id == self.content_id assert landing.blocks == [block] + def test_de_json_none(self, client): + assert Landing.de_json({}, client) is None + def test_de_json_required(self, client, block): json_dict = {'pumpkin': self.pumpkin, 'content_id': self.content_id, 'blocks': [block.to_dict()]} landing = Landing.de_json(json_dict, client) diff --git a/tests/test_link.py b/tests/test_link.py index 09a36e3..f752b0e 100644 --- a/tests/test_link.py +++ b/tests/test_link.py @@ -13,6 +13,9 @@ class TestLink: assert link.type == self.type assert link.social_network == self.social_network + def test_de_json_none(self, client): + assert Link.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'title': self.title, 'href': self.href, 'type_': self.type} link = Link.de_json(json_dict, client) diff --git a/tests/test_lyrics.py b/tests/test_lyrics.py index 39f455e..1dadfeb 100644 --- a/tests/test_lyrics.py +++ b/tests/test_lyrics.py @@ -32,6 +32,9 @@ class TestLyrics: assert lyrics.text_language == self.text_language assert lyrics.show_translation == self.show_translation + def test_de_json_none(self, client): + assert Lyrics.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'lyrics': self.lyrics, 'full_lyrics': self.full_lyrics, 'has_rights': self.has_rights, 'text_language': self.text_language, diff --git a/tests/test_made_for.py b/tests/test_made_for.py index 2300054..de781d2 100644 --- a/tests/test_made_for.py +++ b/tests/test_made_for.py @@ -6,6 +6,9 @@ class TestMadeFor: assert made_for.user_info == user assert made_for.case_forms == case_forms + def test_de_json_none(self, client): + assert MadeFor.de_json({}, client) is None + def test_de_json_required(self, client, user, case_forms): json_dict = {'user_info': user.to_dict(), 'case_forms': case_forms.to_dict()} made_for = MadeFor.de_json(json_dict, client) diff --git a/tests/test_major.py b/tests/test_major.py index 8bdf8fd..a166176 100644 --- a/tests/test_major.py +++ b/tests/test_major.py @@ -9,6 +9,9 @@ class TestMajor: assert major.id == self.id assert major.name == self.name + def test_de_json_none(self, client): + assert Major.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'name': self.name} major = Major.de_json(json_dict, client) diff --git a/tests/test_mix_link.py b/tests/test_mix_link.py index 8d3034f..d2121d2 100644 --- a/tests/test_mix_link.py +++ b/tests/test_mix_link.py @@ -19,6 +19,9 @@ class TestMixLink: assert mix_link.background_image_uri == self.background_image_uri assert mix_link.cover_white == self.cover_white + def test_de_json_none(self, client): + assert MixLink.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'title': self.title, 'url': self.url, 'url_scheme': self.url_scheme, 'text_color': self.text_color, 'background_color': self.background_color, 'background_image_uri': self.background_image_uri, diff --git a/tests/test_normalization.py b/tests/test_normalization.py index 6c7f238..85a59e2 100644 --- a/tests/test_normalization.py +++ b/tests/test_normalization.py @@ -9,6 +9,9 @@ class TestNormalization: assert normalization.gain == self.gain assert normalization.peak == self.peak + def test_de_json_none(self, client): + assert Normalization.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'gain': self.gain, 'peak': self.peak} normalization = Normalization.de_json(json_dict, client) diff --git a/tests/test_pager.py b/tests/test_pager.py index 0aa627d..6928bf1 100644 --- a/tests/test_pager.py +++ b/tests/test_pager.py @@ -11,6 +11,9 @@ class TestPager: assert pager.page == self.page assert pager.per_page == self.per_page + def test_de_json_none(self, client): + assert Pager.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'total': self.total, 'page': self.page, 'per_page': self.per_page} pager = Pager.de_json(json_dict, client) diff --git a/tests/test_passport_phone.py b/tests/test_passport_phone.py index 013c88a..a2fd0bd 100644 --- a/tests/test_passport_phone.py +++ b/tests/test_passport_phone.py @@ -7,6 +7,9 @@ class TestPassportPhone: def test_expected_values(self, passport_phone): assert passport_phone.phone == self.phone + def test_de_json_none(self, client): + assert PassportPhone.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'phone': self.phone} passport_phone = PassportPhone.de_json(json_dict, client) diff --git a/tests/test_permission_alerts.py b/tests/test_permission_alerts.py index 9b27371..7353757 100644 --- a/tests/test_permission_alerts.py +++ b/tests/test_permission_alerts.py @@ -14,6 +14,9 @@ class TestPermissionAlerts: def test_expected_values(self, permission_alerts): assert permission_alerts.alerts == self.alerts + def test_de_json_none(self, client): + assert PermissionAlerts.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'alerts': self.alerts} permission_alerts = PermissionAlerts.de_json(json_dict, client) diff --git a/tests/test_permissions.py b/tests/test_permissions.py index c05fe4c..006cbd1 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -11,6 +11,9 @@ class TestPermissions: assert permissions.values == self.values assert permissions.default == self.default + def test_de_json_none(self, client): + assert Permissions.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'until': self.until, 'values': self.values, 'default': self.default} permissions = Permissions.de_json(json_dict, client) diff --git a/tests/test_personal_playlists_data.py b/tests/test_personal_playlists_data.py index 385042d..bfb15b9 100644 --- a/tests/test_personal_playlists_data.py +++ b/tests/test_personal_playlists_data.py @@ -7,6 +7,9 @@ class TestPersonalPlaylistsData: def test_expected_values(self, personal_playlists_data): assert personal_playlists_data.is_wizard_passed == self.is_wizard_passed + def test_de_json_none(self, client): + assert PersonalPlaylistsData.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'is_wizard_passed': self.is_wizard_passed} personal_playlists_data = PersonalPlaylistsData.de_json(json_dict, client) diff --git a/tests/test_play_context.py b/tests/test_play_context.py index 934ebcb..754d22c 100644 --- a/tests/test_play_context.py +++ b/tests/test_play_context.py @@ -12,6 +12,9 @@ class TestPlayContext: assert play_context.context_item == self.context_item assert play_context.tracks == [track_short_old] + def test_de_json_none(self, client): + assert PlayContext.de_json({}, client) is None + def test_de_json_required(self, client, track_short_old): json_dict = {'client_': self.client_, 'context': self.context, 'context_item': self.context_item, 'tracks': [track_short_old.to_dict()]} diff --git a/tests/test_play_contexts_data.py b/tests/test_play_contexts_data.py index a74b1e7..d67941c 100644 --- a/tests/test_play_contexts_data.py +++ b/tests/test_play_contexts_data.py @@ -5,6 +5,9 @@ class TestPlayContextsData: def test_expected_values(self, play_contexts_data, track_short_old): assert play_contexts_data.other_tracks == [track_short_old] + def test_de_json_none(self, client): + assert PlayContextsData.de_json({}, client) is None + def test_de_json_required(self, client, track_short_old): json_dict = {'other_tracks': [track_short_old.to_dict()]} play_contexts_data = PlayContextsData.de_json(json_dict, client) diff --git a/tests/test_play_counter.py b/tests/test_play_counter.py index 33adfb0..acefa26 100644 --- a/tests/test_play_counter.py +++ b/tests/test_play_counter.py @@ -11,6 +11,9 @@ class TestPlayCounter: assert play_counter.description == self.description assert play_counter.updated == self.updated + def test_de_json_none(self, client): + assert PlayCounter.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'value': self.value, 'description': self.description, 'updated': self.updated} play_counter = PlayCounter.de_json(json_dict, client) diff --git a/tests/test_playlist.py b/tests/test_playlist.py index 879da40..9f2c472 100644 --- a/tests/test_playlist.py +++ b/tests/test_playlist.py @@ -61,6 +61,9 @@ class TestPlaylist: assert playlist.is_for_from == self.is_for_from assert playlist.regions == self.regions + def test_de_json_none(self, client): + assert Playlist.de_json({}, client) is None + def test_de_json_required(self, client, user, cover, made_for, play_counter, playlist_absence): json_dict = {'owner': user.to_dict(), 'uid': self.uid, 'kind': self.kind, 'title': self.title, 'track_count': self.track_count, 'cover': cover.to_dict(), 'made_for': made_for.to_dict(), diff --git a/tests/test_playlist_absence.py b/tests/test_playlist_absence.py index 4ce6ca3..27b70fa 100644 --- a/tests/test_playlist_absence.py +++ b/tests/test_playlist_absence.py @@ -9,6 +9,9 @@ class TestPlaylistAbsence: assert playlist_absence.kind == self.kind assert playlist_absence.reason == self.reason + def test_de_json_none(self, client): + assert PlaylistAbsence.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'kind': self.kind, 'reason': self.reason} playlist_absence = PlaylistAbsence.de_json(json_dict, client) diff --git a/tests/test_playlist_id.py b/tests/test_playlist_id.py index 0a69012..275b43d 100644 --- a/tests/test_playlist_id.py +++ b/tests/test_playlist_id.py @@ -9,6 +9,9 @@ class TestPlaylistId: assert playlist_id.uid == self.uid assert playlist_id.kind == self.kind + def test_de_json_none(self, client): + assert PlaylistId.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'uid': self.uid, 'kind': self.kind} playlist_id = PlaylistId.de_json(json_dict, client) diff --git a/tests/test_playlists_likes.py b/tests/test_playlists_likes.py index b33b48b..65401c9 100644 --- a/tests/test_playlists_likes.py +++ b/tests/test_playlists_likes.py @@ -17,6 +17,9 @@ class TestPlaylistsLikes: assert playlists_likes.id == self.id assert playlists_likes.playlist == playlist + def test_de_json_none(self, client): + assert PlaylistsLikes.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'timestamp': self.timestamp} playlists_likes = PlaylistsLikes.de_json(json_dict, client) diff --git a/tests/test_plus.py b/tests/test_plus.py index 69f281c..eca08f8 100644 --- a/tests/test_plus.py +++ b/tests/test_plus.py @@ -9,6 +9,9 @@ class TestPlus: assert plus.has_plus == self.has_plus assert plus.is_tutorial_completed == self.is_tutorial_completed + def test_de_json_none(self, client): + assert Plus.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'has_plus': self.has_plus, 'is_tutorial_completed': self.is_tutorial_completed} plus = Plus.de_json(json_dict, client) diff --git a/tests/test_price.py b/tests/test_price.py index 46eb2ba..4c5ca46 100644 --- a/tests/test_price.py +++ b/tests/test_price.py @@ -9,6 +9,9 @@ class TestPrice: assert price.amount == self.amount assert price.currency == self.currency + def test_de_json_none(self, client): + assert Price.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'amount': self.amount, 'currency': self.currency} price = Price.de_json(json_dict, client) diff --git a/tests/test_product.py b/tests/test_product.py index 3831f83..330bcbd 100644 --- a/tests/test_product.py +++ b/tests/test_product.py @@ -36,6 +36,9 @@ class TestProduct: assert product.button_additional_text == self.button_additional_text assert product.payment_method_types == self.payment_method_types + def test_de_json_none(self, client): + assert Product.de_json({}, client) is None + def test_de_json_required(self, client, price): json_dict = {'product_id': self.product_id, 'type_': self.type, 'common_period_duration': self.common_period_duration, 'duration': self.duration, diff --git a/tests/test_promo_code_status.py b/tests/test_promo_code_status.py index 46a070b..ba2c699 100644 --- a/tests/test_promo_code_status.py +++ b/tests/test_promo_code_status.py @@ -17,6 +17,9 @@ class TestPromoCodeStatus: assert promo_code_status.status_desc == self.status_desc assert promo_code_status.account_status == status + def test_de_json_none(self, client): + assert PromoCodeStatus.de_json({}, client) is None + def test_de_json_required(self, client, status): json_dict = {'status': self.status, 'status_desc': self.status_desc, 'account_status': status.to_dict()} promo_code_status = PromoCodeStatus.de_json(json_dict, client) diff --git a/tests/test_promotion.py b/tests/test_promotion.py index 5fe2f88..98bc94c 100644 --- a/tests/test_promotion.py +++ b/tests/test_promotion.py @@ -23,6 +23,9 @@ class TestPromotion: assert promotion.gradient == self.gradient assert promotion.image == self.image + def test_de_json_none(self, client): + assert Promotion.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'promo_id': self.promo_id, 'title': self.title, 'subtitle': self.subtitle, 'heading': self.heading, 'url': self.url, 'url_scheme': self.url_scheme, 'text_color': self.text_color, diff --git a/tests/test_ratings.py b/tests/test_ratings.py index f270062..22c1db8 100644 --- a/tests/test_ratings.py +++ b/tests/test_ratings.py @@ -11,6 +11,9 @@ class TestRatings: assert ratings.month == self.month assert ratings.day == self.day + def test_de_json_none(self, client): + assert Ratings.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'week': self.week, 'month': self.month} ratings = Ratings.de_json(json_dict, client) diff --git a/tests/test_restrictions.py b/tests/test_restrictions.py index bc5afed..a1b7910 100644 --- a/tests/test_restrictions.py +++ b/tests/test_restrictions.py @@ -9,6 +9,9 @@ class TestRestrictions: assert restrictions.energy == discrete_scale assert restrictions.mood_energy == enum + def test_de_json_none(self, client): + assert Restrictions.de_json({}, client) is None + def test_de_json_required(self, client, enum): json_dict = {'language': enum.to_dict(), 'diversity': enum.to_dict()} restrictions = Restrictions.de_json(json_dict, client) diff --git a/tests/test_rotor_settings.py b/tests/test_rotor_settings.py index b70695d..a17804c 100644 --- a/tests/test_rotor_settings.py +++ b/tests/test_rotor_settings.py @@ -15,6 +15,9 @@ class TestRotorSettings: assert rotor_settings.energy == self.energy assert rotor_settings.mood_energy == self.mood_energy + def test_de_json_none(self, client): + assert RotorSettings.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'language': self.language, 'diversity': self.diversity} rotor_settings = RotorSettings.de_json(json_dict, client) diff --git a/tests/test_search.py b/tests/test_search.py index df5cd3d..5989467 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -39,6 +39,9 @@ class TestSearch: assert search.misspell_corrected == self.misspell_corrected assert search.nocorrect == self.nocorrect + def test_de_json_none(self, client): + assert Search.de_json({}, client) is None + def test_de_json_required(self, client, best, search_result): json_dict = {'search_request_id': self.search_request_id, 'text': self.text, 'best': best.to_dict(), 'albums': search_result(3).to_dict(), 'artists': search_result(2).to_dict(), diff --git a/tests/test_search_result.py b/tests/test_search_result.py index cf55ff3..5c1ac50 100644 --- a/tests/test_search_result.py +++ b/tests/test_search_result.py @@ -14,6 +14,9 @@ class TestSearchResult: assert search_result.order == self.order assert search_result.results == results + def test_de_json_none(self, client): + assert SearchResult.de_json({}, client) is None + def test_de_json_required(self, client, result_with_type): result, type = result_with_type diff --git a/tests/test_sequence.py b/tests/test_sequence.py index 7f688bc..f2e7c59 100644 --- a/tests/test_sequence.py +++ b/tests/test_sequence.py @@ -10,6 +10,9 @@ class TestSequence: assert sequence.track == track assert sequence.liked == self.liked + def test_de_json_none(self, client): + assert Sequence.de_json({}, client) is None + def test_de_json_required(self, client, track): json_dict = {'type_': self.type, 'track': track.to_dict(), 'liked': self.liked} sequence = Sequence.de_json(json_dict, client) diff --git a/tests/test_settings.py b/tests/test_settings.py index dfe06d2..12252ba 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -12,6 +12,9 @@ class TestSettings: assert settings.promo_codes_enabled == self.promo_codes_enabled assert settings.web_payment_month_product_price == price + def test_de_json_none(self, client): + assert Settings.de_json({}, client) is None + def test_de_json_required(self, client, product): json_dict = {'in_app_products': [product.to_dict()], 'native_products': [product.to_dict()], 'web_payment_url': self.web_payment_url, 'promo_codes_enabled': self.promo_codes_enabled} diff --git a/tests/test_station.py b/tests/test_station.py index 4bf2df8..900164a 100644 --- a/tests/test_station.py +++ b/tests/test_station.py @@ -16,6 +16,9 @@ class TestStation: assert station.restrictions2 == restrictions assert station.parent_id == id_ + def test_de_json_none(self, client): + assert Station.de_json({}, client) is None + def test_de_json_required(self, client, id_, icon, restrictions): json_dict = {'id_': id_.to_dict(), 'name': self.name, 'icon': icon.to_dict(), 'mts_icon': icon.to_dict(), 'geocell_icon': icon.to_dict(), 'id_for_from': self.id_for_from, diff --git a/tests/test_station_result.py b/tests/test_station_result.py index 68a722d..3082e26 100644 --- a/tests/test_station_result.py +++ b/tests/test_station_result.py @@ -13,6 +13,9 @@ class TestStationResult: assert station_result.explanation == self.explanation assert station_result.prerolls == self.prerolls + def test_de_json_none(self, client): + assert StationResult.de_json({}, client) is None + def test_de_json_required(self, client, station, rotor_settings, ad_params): json_dict = {'station': station.to_dict(), 'settings': rotor_settings.to_dict(), 'settings2': rotor_settings.to_dict(), 'ad_params': ad_params.to_dict()} diff --git a/tests/test_station_tracks_result.py b/tests/test_station_tracks_result.py index 96dc4b4..195cfc8 100644 --- a/tests/test_station_tracks_result.py +++ b/tests/test_station_tracks_result.py @@ -18,6 +18,9 @@ class TestStationTracksResult: assert station_tracks_result.batch_id == self.batch_id assert station_tracks_result.pumpkin == self.pumpkin + def test_de_json_none(self, client): + assert StationTracksResult.de_json({}, client) is None + def test_de_json_required(self, client, id_, sequence): json_dict = {'id_': id_.to_dict(), 'sequence': [sequence.to_dict()], 'batch_id': self.batch_id, 'pumpkin': self.pumpkin} diff --git a/tests/test_status.py b/tests/test_status.py index 98ba315..f19c306 100644 --- a/tests/test_status.py +++ b/tests/test_status.py @@ -23,6 +23,9 @@ class TestStatus: assert status.station_exists == self.station_exists assert status.premium_region == self.premium_region + def test_de_json_none(self, client): + assert Status.de_json({}, client) is None + def test_de_json_required(self, client, account, permissions): json_dict = {'account': account.to_dict(), 'permissions': permissions.to_dict()} status = Status.de_json(json_dict, client) diff --git a/tests/test_subscription.py b/tests/test_subscription.py index a03795d..4cbacb7 100644 --- a/tests/test_subscription.py +++ b/tests/test_subscription.py @@ -12,6 +12,9 @@ class TestSubscription: assert subscription.mcdonalds == self.mcdonalds assert subscription.end == self.end + def test_de_json_none(self, client): + assert Subscription.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {} subscription = Subscription.de_json(json_dict, client) diff --git a/tests/test_suggestions.py b/tests/test_suggestions.py index aa2bfc8..bf5b7b1 100644 --- a/tests/test_suggestions.py +++ b/tests/test_suggestions.py @@ -23,6 +23,9 @@ class TestSuggestions: assert suggestions.best == best assert suggestions.suggestions == self.suggestions + def test_de_json_none(self, client): + assert Suggestions.de_json({}, client) is None + def test_de_json_required(self, client, best): json_dict = {'best': best.to_dict(), 'suggestions': self.suggestions} suggestions = Suggestions.de_json(json_dict, client) diff --git a/tests/test_supplement.py b/tests/test_supplement.py index 139a608..a5f0ccc 100644 --- a/tests/test_supplement.py +++ b/tests/test_supplement.py @@ -18,6 +18,9 @@ class TestSupplement: assert supplement.videos == [video_supplement] assert supplement.radio_is_available == self.radio_is_available + def test_de_json_none(self, client): + assert Supplement.de_json({}, client) is None + def test_de_json_required(self, client, lyrics, video_supplement): json_dict = {'id_': self.id, 'lyrics': lyrics.to_dict(), 'videos': [video_supplement.to_dict()], 'radio_is_available': self.radio_is_available} diff --git a/tests/test_title.py b/tests/test_title.py index b0f0215..546e790 100644 --- a/tests/test_title.py +++ b/tests/test_title.py @@ -9,6 +9,9 @@ class TestTitle: assert title.title == self.title assert title.full_title == self.full_title + def test_de_json_none(self, client): + assert Title.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'title': self.title} title = Title.de_json(json_dict, client) diff --git a/tests/test_track.py b/tests/test_track.py index 513f860..51ca143 100644 --- a/tests/test_track.py +++ b/tests/test_track.py @@ -47,6 +47,9 @@ class TestTrack: assert track.preview_duration_ms == self.preview_duration_ms assert track.available_full_without_permission == self.available_full_without_permission + def test_de_json_none(self, client): + assert Track.de_json({}, client) is None + def test_de_json_required(self, client, artist, album): json_dict = {'id_': self.id, 'title': self.title, 'available': self.available, 'artists': [artist.to_dict()], 'albums': [album.to_dict()]} diff --git a/tests/test_track_id.py b/tests/test_track_id.py index 847abf9..a3e3ee5 100644 --- a/tests/test_track_id.py +++ b/tests/test_track_id.py @@ -9,6 +9,9 @@ class TestTrackId: assert track_id.id == self.id assert track_id.album_id == self.album_id + def test_de_json_none(self, client): + assert TrackId.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'id_': self.id} track_id = TrackId.de_json(json_dict, client) diff --git a/tests/test_track_position.py b/tests/test_track_position.py index c193141..6591194 100644 --- a/tests/test_track_position.py +++ b/tests/test_track_position.py @@ -9,6 +9,9 @@ class TestTrackPosition: assert track_position.volume == self.volume assert track_position.index == self.index + def test_de_json_none(self, client): + assert TrackPosition.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'volume': self.volume, 'index': self.index} track_position = TrackPosition.de_json(json_dict, client) diff --git a/tests/test_track_short.py b/tests/test_track_short.py index 6a77de5..861897e 100644 --- a/tests/test_track_short.py +++ b/tests/test_track_short.py @@ -18,6 +18,9 @@ class TestTrackShort: assert track_short.timestamp == self.timestamp assert track_short.album_id == self.album_id + def test_de_json_none(self, client): + assert TrackShort.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'timestamp': self.timestamp} track_short = TrackShort.de_json(json_dict, client) diff --git a/tests/test_track_short_old.py b/tests/test_track_short_old.py index f87fafc..9c64c5e 100644 --- a/tests/test_track_short_old.py +++ b/tests/test_track_short_old.py @@ -8,6 +8,9 @@ class TestTrackShortOld: assert track_short_old.track_id == track_id assert track_short_old.timestamp == self.timestamp + def test_de_json_none(self, client): + assert TrackShortOld.de_json({}, client) is None + def test_de_json_required(self, client, track_id): json_dict = {'track_id': track_id.to_dict(), 'timestamp': self.timestamp} track_short_old = TrackShortOld.de_json(json_dict, client) diff --git a/tests/test_track_with_ads.py b/tests/test_track_with_ads.py index b6045d1..e959d3b 100644 --- a/tests/test_track_with_ads.py +++ b/tests/test_track_with_ads.py @@ -8,6 +8,9 @@ class TestTrackWithAds: assert track_with_ads.type == self.type assert track_with_ads.track == track + def test_de_json_none(self, client): + assert TrackWithAds.de_json({}, client) is None + def test_de_json_required(self, client, track): json_dict = {'type_': self.type, 'track': track.to_dict()} track_with_ads = TrackWithAds.de_json(json_dict, client) diff --git a/tests/test_tracks_list.py b/tests/test_tracks_list.py index 75afa3c..9e43c61 100644 --- a/tests/test_tracks_list.py +++ b/tests/test_tracks_list.py @@ -17,6 +17,9 @@ class TestTracksList: assert tracks_list.revision == self.revision assert tracks_list.tracks == [track_short] + def test_de_json_none(self, client): + assert TracksList.de_json({}, client) is None + def test_de_json_required(self, client, track_short): json_dict = {'uid': self.uid, 'revision': self.revision, 'tracks': [track_short.to_dict()]} tracks_list = TracksList.de_json(json_dict, client) diff --git a/tests/test_user.py b/tests/test_user.py index e7f3dac..89efa2c 100644 --- a/tests/test_user.py +++ b/tests/test_user.py @@ -15,6 +15,9 @@ class TestUser: assert user.sex == self.sex assert user.verified == self.verified + def test_de_json_none(self, client): + assert User.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'uid': self.uid, 'login': self.login, 'name': self.name, 'sex': self.sex, 'verified': self.verified} diff --git a/tests/test_value.py b/tests/test_value.py index fbc7a00..9dfa0f5 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -9,6 +9,9 @@ class TestValue: assert value.value == self.value assert value.name == self.name + def test_de_json_none(self, client): + assert Value.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'value': self.value, 'name': self.name} value = Value.de_json(json_dict, client) diff --git a/tests/test_video.py b/tests/test_video.py index 4c14fde..255f825 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -27,6 +27,9 @@ class TestVideo: assert video.html_auto_play_video_player == self.html_auto_play_video_player assert video.regions == self.regions + def test_de_json_none(self, client): + assert Video.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'title': self.title} video = Video.de_json(json_dict, client) diff --git a/tests/test_video_supplement.py b/tests/test_video_supplement.py index d80db25..e5a4f7f 100644 --- a/tests/test_video_supplement.py +++ b/tests/test_video_supplement.py @@ -21,6 +21,9 @@ class TestVideoSupplement: assert video_supplement.embed_url == self.embed_url assert video_supplement.embed == self.embed + def test_de_json_none(self, client): + assert VideoSupplement.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'cover': self.cover, 'title': self.title, 'provider': self.provider, 'provider_video_id': self.provider_video_id} diff --git a/tests/test_vinyl.py b/tests/test_vinyl.py index ca278cf..bf157a8 100644 --- a/tests/test_vinyl.py +++ b/tests/test_vinyl.py @@ -17,6 +17,9 @@ class TestVinyl: assert vinyl.price == self.price assert vinyl.media == self.media + def test_de_json_none(self, client): + assert Vinyl.de_json({}, client) is None + def test_de_json_required(self, client): json_dict = {'url': self.url, 'picture': self.picture, 'title': self.title, 'year': self.year, 'price': self.price, 'media': self.media} From 7966f87c0c44b14bfff88365f893a3254a57426e Mon Sep 17 00:00:00 2001 From: Marshal Date: Sun, 29 Dec 2019 11:06:27 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D1=81=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=87=D0=B5=D0=B9=20=D0=BF=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D0=B3=D0=BE=20=D1=81=D0=BB=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D1=80=D1=8F=20=D0=B2=20de=5Flist=20=D0=BA=D0=B0=D0=B6=D0=B4?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0=20#17?= =?UTF-8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_album.py | 3 +++ tests/test_album_event.py | 3 +++ tests/test_albums_likes.py | 3 +++ tests/test_artist.py | 3 +++ tests/test_artist_event.py | 3 +++ tests/test_artists_likes.py | 3 +++ tests/test_auto_renewable.py | 3 +++ tests/test_block.py | 3 +++ tests/test_block_entity.py | 3 +++ tests/test_chart.py | 3 +++ tests/test_chart_item.py | 3 +++ tests/test_cover.py | 3 +++ tests/test_day.py | 3 +++ tests/test_download_info.py | 3 +++ tests/test_event.py | 3 +++ tests/test_generated_playlist.py | 3 +++ tests/test_genre.py | 3 +++ tests/test_label.py | 3 +++ tests/test_link.py | 3 +++ tests/test_mix_link.py | 3 +++ tests/test_passport_phone.py | 3 +++ tests/test_playlist.py | 3 +++ tests/test_playlist_id.py | 3 +++ tests/test_playlists_likes.py | 3 +++ tests/test_product.py | 3 +++ tests/test_promotion.py | 3 +++ tests/test_sequence.py | 3 +++ tests/test_station_result.py | 3 +++ tests/test_track.py | 3 +++ tests/test_track_short.py | 3 +++ tests/test_track_short_old.py | 3 +++ tests/test_track_with_ads.py | 3 +++ tests/test_value.py | 3 +++ tests/test_video.py | 3 +++ tests/test_video_supplement.py | 3 +++ tests/test_vinyl.py | 3 +++ 36 files changed, 108 insertions(+) diff --git a/tests/test_album.py b/tests/test_album.py index 39db295..922d609 100644 --- a/tests/test_album.py +++ b/tests/test_album.py @@ -54,6 +54,9 @@ class TestAlbum: def test_de_json_none(self, client): assert Album.de_json({}, client) is None + def test_de_list_none(self, client): + assert Album.de_list({}, client) == [] + def test_de_json_required(self, client, artist, label): json_dict = {'id_': self.id, 'title': self.title, 'cover_uri': self.cover_uri, 'track_count': self.track_count, 'artists': [artist.to_dict()], 'labels': [label.to_dict()], diff --git a/tests/test_album_event.py b/tests/test_album_event.py index fd99d19..65e2173 100644 --- a/tests/test_album_event.py +++ b/tests/test_album_event.py @@ -9,6 +9,9 @@ class TestAlbumEvent: def test_de_json_none(self, client): assert AlbumEvent.de_json({}, client) is None + def test_de_list_none(self, client): + assert AlbumEvent.de_list({}, client) == [] + def test_de_json_required(self, client, album, track): json_dict = {'album': album.to_dict(), 'tracks': [track.to_dict()]} album_event = AlbumEvent.de_json(json_dict, client) diff --git a/tests/test_albums_likes.py b/tests/test_albums_likes.py index b797c45..8305268 100644 --- a/tests/test_albums_likes.py +++ b/tests/test_albums_likes.py @@ -20,6 +20,9 @@ class TestAlbumsLikes: def test_de_json_none(self, client): assert AlbumsLikes.de_json({}, client) is None + def test_de_list_none(self, client): + assert AlbumsLikes.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'timestamp': self.timestamp} albums_likes = AlbumsLikes.de_json(json_dict, client) diff --git a/tests/test_artist.py b/tests/test_artist.py index 68f80fd..57ffebb 100644 --- a/tests/test_artist.py +++ b/tests/test_artist.py @@ -52,6 +52,9 @@ class TestArtist: def test_de_json_none(self, client): assert Artist.de_json({}, client) is None + def test_de_list_none(self, client): + assert Artist.de_list({}, client) == [] + def test_de_json_required(self, client, cover): json_dict = {'id_': self.id, 'name': self.name, 'cover': cover.to_dict()} artist = Artist.de_json(json_dict, client) diff --git a/tests/test_artist_event.py b/tests/test_artist_event.py index ab9a737..fa59f90 100644 --- a/tests/test_artist_event.py +++ b/tests/test_artist_event.py @@ -10,6 +10,9 @@ class TestArtistEvent: def test_de_json_none(self, client): assert ArtistEvent.de_json({}, client) is None + def test_de_list_none(self, client): + assert ArtistEvent.de_list({}, client) == [] + def test_de_json_required(self, client, artist, track): json_dict = {'artist': artist.to_dict(), 'tracks': [track.to_dict()], 'similar_to_artists_from_history': [artist.to_dict()]} diff --git a/tests/test_artists_likes.py b/tests/test_artists_likes.py index 572ebcc..c900105 100644 --- a/tests/test_artists_likes.py +++ b/tests/test_artists_likes.py @@ -20,6 +20,9 @@ class TestArtistsLikes: def test_de_json_none(self, client): assert ArtistsLikes.de_json({}, client) is None + def test_de_list_none(self, client): + assert ArtistsLikes.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {} artists_likes = ArtistsLikes.de_json(json_dict, client) diff --git a/tests/test_auto_renewable.py b/tests/test_auto_renewable.py index 4a6cad0..3e8f7a8 100644 --- a/tests/test_auto_renewable.py +++ b/tests/test_auto_renewable.py @@ -21,6 +21,9 @@ class TestAutoRenewable: def test_de_json_none(self, client): assert AutoRenewable.de_json({}, client) is None + def test_de_list_none(self, client): + assert AutoRenewable.de_list({}, client) == [] + def test_de_json_required(self, client, product): json_dict = {'expires': self.expires, 'vendor': self.vendor, 'vendor_help_url': self.vendor_help_url, 'product_id': self.product_id, 'product': product.to_dict(), 'finished': self.finished} diff --git a/tests/test_block.py b/tests/test_block.py index 5d68200..13fac9f 100644 --- a/tests/test_block.py +++ b/tests/test_block.py @@ -30,6 +30,9 @@ class TestBlock: def test_de_json_none(self, client): assert Block.de_json({}, client) is None + def test_de_list_none(self, client): + assert Block.de_list({}, client) == [] + def test_de_json_required(self, client, block_entity): json_dict = {'id_': self.id, 'type_': self.type, 'type_for_from': self.type_for_from, 'title': self.title, 'entities': [block_entity.to_dict()]} diff --git a/tests/test_block_entity.py b/tests/test_block_entity.py index e2bb843..ea8796c 100644 --- a/tests/test_block_entity.py +++ b/tests/test_block_entity.py @@ -25,6 +25,9 @@ class TestBlockEntity: assert block_entity.type == type_ assert block_entity.data == data + def test_de_list_none(self, client): + assert BlockEntity.de_list({}, client) == [] + def test_de_json_none(self, client): assert BlockEntity.de_json({}, client) is None diff --git a/tests/test_chart.py b/tests/test_chart.py index 0ebbbb8..32cb62f 100644 --- a/tests/test_chart.py +++ b/tests/test_chart.py @@ -17,6 +17,9 @@ class TestChart: def test_de_json_none(self, client): assert Chart.de_json({}, client) is None + def test_de_list_none(self, client): + assert Chart.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'position': self.position, 'progress': self.progress, 'listeners': self.listeners, 'shift': self.shift} diff --git a/tests/test_chart_item.py b/tests/test_chart_item.py index 3332790..190b11a 100644 --- a/tests/test_chart_item.py +++ b/tests/test_chart_item.py @@ -9,6 +9,9 @@ class TestChartItem: def test_de_json_none(self, client): assert ChartItem.de_json({}, client) is None + def test_de_list_none(self, client): + assert ChartItem.de_list({}, client) == [] + def test_de_json_required(self, client, track, chart): json_dict = {'track': track.to_dict(), 'chart': chart.to_dict()} chart_item = ChartItem.de_json(json_dict, client) diff --git a/tests/test_cover.py b/tests/test_cover.py index 3fcac86..10201fc 100644 --- a/tests/test_cover.py +++ b/tests/test_cover.py @@ -24,6 +24,9 @@ class TestCover: def test_de_json_none(self, client): assert Cover.de_json({}, client) is None + def test_de_list_none(self, client): + assert Cover.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {} cover = Cover.de_json(json_dict, client) diff --git a/tests/test_day.py b/tests/test_day.py index 0a3c04b..ee75b19 100644 --- a/tests/test_day.py +++ b/tests/test_day.py @@ -13,6 +13,9 @@ class TestDay: def test_de_json_none(self, client): assert Day.de_json({}, client) is None + def test_de_list_none(self, client): + assert Day.de_list({}, client) == [] + def test_de_json_required(self, client, event, track_with_ads, track): json_dict = {'day': self.day, 'events': [event.to_dict()], 'tracks_to_play_with_ads': [track_with_ads.to_dict()], 'tracks_to_play': [track.to_dict()]} diff --git a/tests/test_download_info.py b/tests/test_download_info.py index d86a9d4..200023b 100644 --- a/tests/test_download_info.py +++ b/tests/test_download_info.py @@ -27,6 +27,9 @@ class TestDownloadInfo: def test_de_json_none(self, client): assert DownloadInfo.de_json({}, client) is None + def test_de_list_none(self, client): + assert DownloadInfo.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'codec': self.codec, 'bitrate_in_kbps': self.bitrate_in_kbps, 'gain': self.gain, 'preview': self.preview, 'download_info_url': self.download_info_url} diff --git a/tests/test_event.py b/tests/test_event.py index 14454ad..57bf479 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -25,6 +25,9 @@ class TestEvent: def test_de_json_none(self, client): assert Event.de_json({}, client) is None + def test_de_list_none(self, client): + assert Event.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'type_': self.type} event = Event.de_json(json_dict, client) diff --git a/tests/test_generated_playlist.py b/tests/test_generated_playlist.py index a26e575..fc2db0e 100644 --- a/tests/test_generated_playlist.py +++ b/tests/test_generated_playlist.py @@ -15,6 +15,9 @@ class TestGeneratedPlaylist: def test_de_json_none(self, client): assert GeneratedPlaylist.de_json({}, client) is None + def test_de_list_none(self, client): + assert GeneratedPlaylist.de_list({}, client) == [] + def test_de_json_required(self, client, playlist): json_dict = {'type_': self.type, 'ready': self.ready, 'notify': self.notify, 'data': playlist.to_dict()} generated_playlist = GeneratedPlaylist.de_json(json_dict, client) diff --git a/tests/test_genre.py b/tests/test_genre.py index 3450bd4..84a6ec9 100644 --- a/tests/test_genre.py +++ b/tests/test_genre.py @@ -45,6 +45,9 @@ class TestGenre: def test_de_json_none(self, client): assert Genre.de_json({}, client) is None + def test_de_list_none(self, client): + assert Genre.de_list({}, client) == [] + def test_de_json_required(self, client, title, images): json_dict = {'id_': self.id, 'weight': self.weight, 'composer_top': self.composer_top, 'title': self.title, 'titles': {'uz': title.to_dict()}, 'images': images.to_dict(), 'show_in_menu': self.show_in_menu} diff --git a/tests/test_label.py b/tests/test_label.py index b46e4a0..2285c87 100644 --- a/tests/test_label.py +++ b/tests/test_label.py @@ -9,6 +9,9 @@ class TestLabel: assert label.id == self.id assert label.name == self.name + def test_de_list_none(self, client): + assert Label.de_list({}, client) == [] + def test_de_json_none(self, client): assert Label.de_json({}, client) is None diff --git a/tests/test_link.py b/tests/test_link.py index f752b0e..0a68646 100644 --- a/tests/test_link.py +++ b/tests/test_link.py @@ -16,6 +16,9 @@ class TestLink: def test_de_json_none(self, client): assert Link.de_json({}, client) is None + def test_de_list_none(self, client): + assert Link.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'title': self.title, 'href': self.href, 'type_': self.type} link = Link.de_json(json_dict, client) diff --git a/tests/test_mix_link.py b/tests/test_mix_link.py index d2121d2..d4b1e3c 100644 --- a/tests/test_mix_link.py +++ b/tests/test_mix_link.py @@ -22,6 +22,9 @@ class TestMixLink: def test_de_json_none(self, client): assert MixLink.de_json({}, client) is None + def test_de_list_none(self, client): + assert MixLink.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'title': self.title, 'url': self.url, 'url_scheme': self.url_scheme, 'text_color': self.text_color, 'background_color': self.background_color, 'background_image_uri': self.background_image_uri, diff --git a/tests/test_passport_phone.py b/tests/test_passport_phone.py index a2fd0bd..c3e198b 100644 --- a/tests/test_passport_phone.py +++ b/tests/test_passport_phone.py @@ -10,6 +10,9 @@ class TestPassportPhone: def test_de_json_none(self, client): assert PassportPhone.de_json({}, client) is None + def test_de_list_none(self, client): + assert PassportPhone.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'phone': self.phone} passport_phone = PassportPhone.de_json(json_dict, client) diff --git a/tests/test_playlist.py b/tests/test_playlist.py index 9f2c472..1887ed6 100644 --- a/tests/test_playlist.py +++ b/tests/test_playlist.py @@ -64,6 +64,9 @@ class TestPlaylist: def test_de_json_none(self, client): assert Playlist.de_json({}, client) is None + def test_de_list_none(self, client): + assert Playlist.de_list({}, client) == [] + def test_de_json_required(self, client, user, cover, made_for, play_counter, playlist_absence): json_dict = {'owner': user.to_dict(), 'uid': self.uid, 'kind': self.kind, 'title': self.title, 'track_count': self.track_count, 'cover': cover.to_dict(), 'made_for': made_for.to_dict(), diff --git a/tests/test_playlist_id.py b/tests/test_playlist_id.py index 275b43d..a939831 100644 --- a/tests/test_playlist_id.py +++ b/tests/test_playlist_id.py @@ -12,6 +12,9 @@ class TestPlaylistId: def test_de_json_none(self, client): assert PlaylistId.de_json({}, client) is None + def test_de_list_none(self, client): + assert PlaylistId.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'uid': self.uid, 'kind': self.kind} playlist_id = PlaylistId.de_json(json_dict, client) diff --git a/tests/test_playlists_likes.py b/tests/test_playlists_likes.py index 65401c9..14340a6 100644 --- a/tests/test_playlists_likes.py +++ b/tests/test_playlists_likes.py @@ -20,6 +20,9 @@ class TestPlaylistsLikes: def test_de_json_none(self, client): assert PlaylistsLikes.de_json({}, client) is None + def test_de_list_none(self, client): + assert PlaylistsLikes.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'timestamp': self.timestamp} playlists_likes = PlaylistsLikes.de_json(json_dict, client) diff --git a/tests/test_product.py b/tests/test_product.py index 330bcbd..54b5200 100644 --- a/tests/test_product.py +++ b/tests/test_product.py @@ -39,6 +39,9 @@ class TestProduct: def test_de_json_none(self, client): assert Product.de_json({}, client) is None + def test_de_list_none(self, client): + assert Product.de_list({}, client) == [] + def test_de_json_required(self, client, price): json_dict = {'product_id': self.product_id, 'type_': self.type, 'common_period_duration': self.common_period_duration, 'duration': self.duration, diff --git a/tests/test_promotion.py b/tests/test_promotion.py index 98bc94c..08d7bde 100644 --- a/tests/test_promotion.py +++ b/tests/test_promotion.py @@ -23,6 +23,9 @@ class TestPromotion: assert promotion.gradient == self.gradient assert promotion.image == self.image + def test_de_list_none(self, client): + assert Promotion.de_list({}, client) == [] + def test_de_json_none(self, client): assert Promotion.de_json({}, client) is None diff --git a/tests/test_sequence.py b/tests/test_sequence.py index f2e7c59..b2aca34 100644 --- a/tests/test_sequence.py +++ b/tests/test_sequence.py @@ -13,6 +13,9 @@ class TestSequence: def test_de_json_none(self, client): assert Sequence.de_json({}, client) is None + def test_de_list_none(self, client): + assert Sequence.de_list({}, client) == [] + def test_de_json_required(self, client, track): json_dict = {'type_': self.type, 'track': track.to_dict(), 'liked': self.liked} sequence = Sequence.de_json(json_dict, client) diff --git a/tests/test_station_result.py b/tests/test_station_result.py index 3082e26..e38c240 100644 --- a/tests/test_station_result.py +++ b/tests/test_station_result.py @@ -16,6 +16,9 @@ class TestStationResult: def test_de_json_none(self, client): assert StationResult.de_json({}, client) is None + def test_de_list_none(self, client): + assert StationResult.de_list({}, client) == [] + def test_de_json_required(self, client, station, rotor_settings, ad_params): json_dict = {'station': station.to_dict(), 'settings': rotor_settings.to_dict(), 'settings2': rotor_settings.to_dict(), 'ad_params': ad_params.to_dict()} diff --git a/tests/test_track.py b/tests/test_track.py index 51ca143..5bae80f 100644 --- a/tests/test_track.py +++ b/tests/test_track.py @@ -50,6 +50,9 @@ class TestTrack: def test_de_json_none(self, client): assert Track.de_json({}, client) is None + def test_de_list_none(self, client): + assert Track.de_list({}, client) == [] + def test_de_json_required(self, client, artist, album): json_dict = {'id_': self.id, 'title': self.title, 'available': self.available, 'artists': [artist.to_dict()], 'albums': [album.to_dict()]} diff --git a/tests/test_track_short.py b/tests/test_track_short.py index 861897e..dcb3611 100644 --- a/tests/test_track_short.py +++ b/tests/test_track_short.py @@ -21,6 +21,9 @@ class TestTrackShort: def test_de_json_none(self, client): assert TrackShort.de_json({}, client) is None + def test_de_list_none(self, client): + assert TrackShort.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'id_': self.id, 'timestamp': self.timestamp} track_short = TrackShort.de_json(json_dict, client) diff --git a/tests/test_track_short_old.py b/tests/test_track_short_old.py index 9c64c5e..70fab7f 100644 --- a/tests/test_track_short_old.py +++ b/tests/test_track_short_old.py @@ -11,6 +11,9 @@ class TestTrackShortOld: def test_de_json_none(self, client): assert TrackShortOld.de_json({}, client) is None + def test_de_list_none(self, client): + assert TrackShortOld.de_list({}, client) == [] + def test_de_json_required(self, client, track_id): json_dict = {'track_id': track_id.to_dict(), 'timestamp': self.timestamp} track_short_old = TrackShortOld.de_json(json_dict, client) diff --git a/tests/test_track_with_ads.py b/tests/test_track_with_ads.py index e959d3b..bf044d6 100644 --- a/tests/test_track_with_ads.py +++ b/tests/test_track_with_ads.py @@ -11,6 +11,9 @@ class TestTrackWithAds: def test_de_json_none(self, client): assert TrackWithAds.de_json({}, client) is None + def test_de_list_none(self, client): + assert TrackWithAds.de_list({}, client) == [] + def test_de_json_required(self, client, track): json_dict = {'type_': self.type, 'track': track.to_dict()} track_with_ads = TrackWithAds.de_json(json_dict, client) diff --git a/tests/test_value.py b/tests/test_value.py index 9dfa0f5..7cd2ea4 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -12,6 +12,9 @@ class TestValue: def test_de_json_none(self, client): assert Value.de_json({}, client) is None + def test_de_list_none(self, client): + assert Value.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'value': self.value, 'name': self.name} value = Value.de_json(json_dict, client) diff --git a/tests/test_video.py b/tests/test_video.py index 255f825..275bb76 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -30,6 +30,9 @@ class TestVideo: def test_de_json_none(self, client): assert Video.de_json({}, client) is None + def test_de_list_none(self, client): + assert Video.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'title': self.title} video = Video.de_json(json_dict, client) diff --git a/tests/test_video_supplement.py b/tests/test_video_supplement.py index e5a4f7f..3ba8739 100644 --- a/tests/test_video_supplement.py +++ b/tests/test_video_supplement.py @@ -24,6 +24,9 @@ class TestVideoSupplement: def test_de_json_none(self, client): assert VideoSupplement.de_json({}, client) is None + def test_de_list_none(self, client): + assert VideoSupplement.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'cover': self.cover, 'title': self.title, 'provider': self.provider, 'provider_video_id': self.provider_video_id} diff --git a/tests/test_vinyl.py b/tests/test_vinyl.py index bf157a8..6eabd2f 100644 --- a/tests/test_vinyl.py +++ b/tests/test_vinyl.py @@ -20,6 +20,9 @@ class TestVinyl: def test_de_json_none(self, client): assert Vinyl.de_json({}, client) is None + def test_de_list_none(self, client): + assert Vinyl.de_list({}, client) == [] + def test_de_json_required(self, client): json_dict = {'url': self.url, 'picture': self.picture, 'title': self.title, 'year': self.year, 'price': self.price, 'media': self.media}