-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
test_station_data.py
34 lines (23 loc) · 906 Bytes
/
test_station_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from yandex_music import StationData
class TestStationData:
name = "Marshal's station"
def test_expected_values(self, station_data):
assert station_data.name == self.name
def test_de_json_none(self, client):
assert StationData.de_json({}, client) is None
def test_de_json_required(self, client):
json_dict = {'name': self.name}
station_data = StationData.de_json(json_dict, client)
assert station_data.name == self.name
def test_de_json_all(self, client):
json_dict = {'name': self.name}
station_data = StationData.de_json(json_dict, client)
assert station_data.name == self.name
def test_equality(self):
a = StationData(self.name)
b = StationData('')
c = StationData(self.name)
assert a != b
assert hash(a) != hash(b)
assert a is not b
assert a == c