Skip to content

Commit

Permalink
Merge pull request #613 from MarshalX/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Nov 17, 2023
2 parents 110a6e0 + 2e7bd8f commit bb8578c
Show file tree
Hide file tree
Showing 165 changed files with 281 additions and 267 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,13 +968,13 @@ def product(price, licence_text_part):
return Product(
TestProduct.product_id,
TestProduct.type,
TestProduct.common_period_duration,
TestProduct.duration,
TestProduct.trial_duration,
price,
TestProduct.feature,
TestProduct.debug,
TestProduct.plus,
price,
TestProduct.common_period_duration,
TestProduct.cheapest,
TestProduct.title,
TestProduct.family_sub,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_album.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ 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) == []
assert Album.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'id': self.id}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_album_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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) == []
assert AlbumEvent.de_list([], client) == []

def test_de_json_required(self, client, album, track):
json_dict = {'album': album.to_dict(), 'tracks': [track.to_dict()]}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ 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) == []
assert Artist.de_list([], client) == []

def test_de_json_required(self, client, cover):
json_dict = {'id': self.id}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_artist_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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) == []
assert ArtistEvent.de_list([], client) == []

def test_de_json_required(self, client, artist, track):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_auto_renewable.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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) == []
assert AutoRenewable.de_list([], client) == []

def test_de_json_required(self, client, product):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ 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) == []
assert Block.de_list([], client) == []

def test_de_json_required(self, client, block_entity):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_block_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_expected_values(self, block_entity_with_data_and_type):
assert block_entity.data == data

def test_de_list_none(self, client):
assert BlockEntity.de_list({}, client) == []
assert BlockEntity.de_list([], client) == []

def test_de_json_none(self, client):
assert BlockEntity.de_json({}, client) is None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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) == []
assert Chart.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_chart_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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) == []
assert ChartItem.de_list([], client) == []

def test_de_json_required(self, client, track, chart):
json_dict = {'track': track.to_dict(), 'chart': chart.to_dict()}
Expand Down
7 changes: 5 additions & 2 deletions tests/test_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
class TestCover:
type = 'pic'
uri = 'avatars.yandex.net/get-music-user-playlist/38125/q0ahkhfQE3neTk/%%?1572609906461'
items_uri = None
items_uri = [
'avatars.yandex.net/get-music-user-playlist/38125/q0ahkhfQE3neTk/%%?1572609906461',
'avatars.yandex.net/get-music-user-playlist/38125/q0ahkhfQE3neTk/%%?1572609906461',
]
dir = '/get-music-user-playlist/34120/pvg900XixWaHcr/'
version = '1572609906461'
custom = True
Expand All @@ -31,7 +34,7 @@ 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) == []
assert Cover.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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) == []
assert Day.de_list([], client) == []

def test_de_json_required(self, client, event, track_with_ads, track):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deactivation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_de_json_none(self, client):
assert Deactivation.de_json({}, client) is None

def test_de_list_none(self, client):
assert Deactivation.de_list({}, client) == []
assert Deactivation.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'method': self.method}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_download_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ 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) == []
assert DownloadInfo.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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) == []
assert Event.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'id': self.id, 'type': self.type}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_generated_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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) == []
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()}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_genre.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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) == []
assert Genre.de_list([], client) == []

def test_de_json_required(self, client, title, images):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_expected_values(self, label):
assert label.name == self.name

def test_de_list_none(self, client):
assert Label.de_list({}, client) == []
assert Label.de_list([], client) == []

def test_de_json_none(self, client):
assert Label.de_json({}, client) is None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_licence_text_part.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_de_json_none(self, client):
assert LicenceTextPart.de_json({}, client) is None

def test_de_list_none(self, client):
assert LicenceTextPart.de_list({}, client) == []
assert LicenceTextPart.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'text': self.text}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_de_json_none(self, client):
assert Like.de_json({}, client) is None

def test_de_list_none(self, client):
assert Like.de_list({}, client) == []
assert Like.de_list([], client) == []

@pytest.mark.parametrize('param', [2, 3, 4])
def test_de_json_all(self, results, types, client, param):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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) == []
assert Link.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'title': self.title, 'href': self.href, 'type': self.type}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mix_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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) == []
assert MixLink.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_de_json_none(self, client):
assert Operator.de_json({}, client) is None

def test_de_list_none(self, client):
assert Operator.de_list({}, client) == []
assert Operator.de_list([], client) == []

def test_de_json_required(self, client, deactivation):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_passport_phone.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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) == []
assert PassportPhone.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'phone': self.phone}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ 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) == []
assert Playlist.de_list([], client) == []

def test_de_json_required(self, client, user, cover, made_for, play_counter, playlist_absence):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_playlist_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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) == []
assert PlaylistId.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'uid': self.uid, 'kind': self.kind}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_poetry_lover_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_de_json_none(self, client):
assert PoetryLoverMatch.de_json({}, client) is None

def test_de_list_none(self, client):
assert PoetryLoverMatch.de_list({}, client) == []
assert PoetryLoverMatch.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'begin': self.begin, 'end': self.end, 'line': self.line}
Expand Down
7 changes: 1 addition & 6 deletions tests/test_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@ 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) == []
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,
'trial_duration': self.trial_duration,
'price': price.to_dict(),
Expand All @@ -81,7 +80,6 @@ def test_de_json_required(self, client, price):

assert product.product_id == self.product_id
assert product.type == self.type
assert product.common_period_duration == self.common_period_duration
assert product.duration == self.duration
assert product.trial_duration == self.trial_duration
assert product.price == price
Expand Down Expand Up @@ -157,7 +155,6 @@ def test_equality(self, price):
a = Product(
self.product_id,
self.type,
self.common_period_duration,
self.duration,
self.trial_duration,
price,
Expand All @@ -168,7 +165,6 @@ def test_equality(self, price):
b = Product(
'',
self.type,
self.common_period_duration,
self.duration,
self.trial_duration,
price,
Expand All @@ -179,7 +175,6 @@ def test_equality(self, price):
c = Product(
self.product_id,
self.type,
self.common_period_duration,
self.duration,
self.trial_duration,
price,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_promotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_expected_values(self, promotion):
assert promotion.image == self.image

def test_de_list_none(self, client):
assert Promotion.de_list({}, client) == []
assert Promotion.de_list([], client) == []

def test_de_json_none(self, client):
assert Promotion.de_json({}, client) is None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_queue_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_de_json_none(self, client):
assert QueueItem.de_json({}, client) is None

def test_de_list_none(self, client):
assert QueueItem.de_list({}, client) == []
assert QueueItem.de_list([], client) == []

def test_de_json_required(self, client, context):
json_dict = {'id': self.id_, 'context': context.to_dict(), 'modified': self.modified}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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) == []
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}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shot.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_de_json_none(self, client):
assert Shot.de_json({}, client) is None

def test_de_list_none(self, client):
assert Shot.de_list({}, client) == []
assert Shot.de_list([], client) == []

def test_de_json_required(self, client, shot_data):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_station_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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) == []
assert StationResult.de_list([], client) == []

def test_de_json_required(self, client, station, rotor_settings, ad_params):
json_dict = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ 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) == []
assert Track.de_list([], client) == []

def test_de_json_required(self, client, artist, album):
json_dict = {'id': self.id}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_track_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_de_json_none(self, client):
assert TrackId.de_json({}, client) is None

def test_de_list_none(self, client):
assert TrackId.de_list({}, client) == []
assert TrackId.de_list([], client) == []

def test_de_json_all(self, client):
json_dict = {'id': self.id, 'track_id': self.track_id, 'album_id': self.album_id, 'from_': self.from_}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_track_short.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ 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) == []
assert TrackShort.de_list([], client) == []

def test_de_json_required(self, client):
json_dict = {'id': self.id, 'timestamp': self.timestamp}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_track_short_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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) == []
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}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_track_with_ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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) == []
assert TrackWithAds.de_list([], client) == []

def test_de_json_required(self, client, track):
json_dict = {'type': self.type, 'track': track.to_dict()}
Expand Down
Loading

0 comments on commit bb8578c

Please sign in to comment.