2019-11-08 02:09:39 +09:00
|
|
|
from yandex_music import PersonalPlaylistsData
|
|
|
|
|
|
|
|
|
|
|
|
class TestPersonalPlaylistsData:
|
Добавлены основные тесты для следующий классов: Account, CaseForms, Cover, DownloadInfo, Enum, InvocationInfo, Lyrics, MadeFor, Permissions, PersonalPlaylistsData, PlayContextsData, Promotion, RotorSettings, Subsription,
Исправлены фикстуры и сравнения для вышеперечисленных классов.
Починен conftest.py
2019-11-08 09:30:15 +09:00
|
|
|
is_wizard_passed = True
|
2019-11-08 02:09:39 +09:00
|
|
|
|
|
|
|
def test_expected_values(self, personal_playlists_data):
|
|
|
|
assert personal_playlists_data.is_wizard_passed == self.is_wizard_passed
|
|
|
|
|
2019-12-29 16:38:24 +09:00
|
|
|
def test_de_json_none(self, client):
|
|
|
|
assert PersonalPlaylistsData.de_json({}, client) is None
|
|
|
|
|
2019-11-08 02:09:39 +09:00
|
|
|
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)
|
|
|
|
|
|
|
|
assert personal_playlists_data.is_wizard_passed == self.is_wizard_passed
|
|
|
|
|
|
|
|
def test_de_json_all(self, client):
|
|
|
|
json_dict = {'is_wizard_passed': self.is_wizard_passed}
|
|
|
|
personal_playlists_data = PersonalPlaylistsData.de_json(json_dict, client)
|
|
|
|
|
|
|
|
assert personal_playlists_data.is_wizard_passed == self.is_wizard_passed
|
|
|
|
|
|
|
|
def test_equality(self):
|
Добавлены основные тесты для следующий классов: Account, CaseForms, Cover, DownloadInfo, Enum, InvocationInfo, Lyrics, MadeFor, Permissions, PersonalPlaylistsData, PlayContextsData, Promotion, RotorSettings, Subsription,
Исправлены фикстуры и сравнения для вышеперечисленных классов.
Починен conftest.py
2019-11-08 09:30:15 +09:00
|
|
|
a = PersonalPlaylistsData(self.is_wizard_passed)
|
|
|
|
b = PersonalPlaylistsData(False)
|
|
|
|
c = PersonalPlaylistsData(self.is_wizard_passed)
|
|
|
|
|
|
|
|
assert a != b
|
|
|
|
assert hash(a) != hash(b)
|
|
|
|
assert a is not b
|
|
|
|
|
|
|
|
assert a == c
|