Добавлены поля pretrial_active и userhash классу Status.
このコミットが含まれているのは:
コミット
10ec9efde9
|
@ -999,6 +999,8 @@ def status(account, permissions, subscription, plus, station_data, alert):
|
|||
alert,
|
||||
TestStatus.premium_region,
|
||||
TestStatus.experiment,
|
||||
TestStatus.pretrial_active,
|
||||
TestStatus.userhash,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ class TestStatus:
|
|||
station_exists = None
|
||||
premium_region = None
|
||||
experiment = 109
|
||||
userhash = '2a1d970ce4dadc3333280aa8727d1c41a380a7622521ecef67928cd4213adb8f'
|
||||
pretrial_active = False
|
||||
|
||||
def test_expected_values(self, status, account, permissions, subscription, plus, alert):
|
||||
assert status.account == account
|
||||
|
@ -27,6 +29,8 @@ class TestStatus:
|
|||
assert status.bar_below == alert
|
||||
assert status.premium_region == self.premium_region
|
||||
assert status.experiment == self.experiment
|
||||
assert status.userhash == self.userhash
|
||||
assert status.pretrial_active == self.pretrial_active
|
||||
|
||||
def test_de_json_none(self, client):
|
||||
assert Status.de_json({}, client) is None
|
||||
|
@ -54,6 +58,8 @@ class TestStatus:
|
|||
'advertisement': self.advertisement,
|
||||
'bar_below': alert.to_dict(),
|
||||
'experiment': self.experiment,
|
||||
'userhash': self.userhash,
|
||||
'pretrial_active': self.pretrial_active,
|
||||
}
|
||||
status = Status.de_json(json_dict, client)
|
||||
|
||||
|
@ -71,6 +77,8 @@ class TestStatus:
|
|||
assert status.bar_below == alert
|
||||
assert status.premium_region == self.premium_region
|
||||
assert status.experiment == self.experiment
|
||||
assert status.userhash == self.userhash
|
||||
assert status.pretrial_active == self.pretrial_active
|
||||
|
||||
def test_equality(self, account, permissions, subscription):
|
||||
a = Status(account, permissions)
|
||||
|
|
|
@ -27,6 +27,8 @@ class Status(YandexMusicObject):
|
|||
bar_below (:obj:`yandex_music.Alert`, optional): Блок с предупреждениями о конце подписке и подарках.
|
||||
premium_region (:obj:`int`, optional): Регион TODO.
|
||||
experiment (:obj:`int`, optional): Включенная новая фича на аккаунте (её ID) TODO.
|
||||
pretrial_active (:obj:`bool`, optional): TODO.
|
||||
userhash (:obj:`str`, optional): Хэш-код идентификатора пользователя.
|
||||
client (:obj:`yandex_music.Client`, optional): Клиент Yandex Music.
|
||||
"""
|
||||
|
||||
|
@ -45,6 +47,8 @@ class Status(YandexMusicObject):
|
|||
bar_below: Optional['Alert'] = None
|
||||
premium_region: Optional[int] = None
|
||||
experiment: Optional[int] = None
|
||||
pretrial_active: Optional[bool] = None
|
||||
userhash: Optional[str] = None
|
||||
client: Optional['Client'] = None
|
||||
|
||||
def __post_init__(self):
|
||||
|
|
読み込み中…
新しいイシューから参照