def test_de_json_all(self, client, id_, sequence):
        json_dict = {'id_': id_.to_dict(), 'sequence': [sequence.to_dict()], 'batch_id': self.batch_id,
                     'pumpkin': self.pumpkin}
        station_tracks_result = StationTracksResult.de_json(json_dict, client)

        assert station_tracks_result.id == id_
        assert station_tracks_result.sequence == [sequence]
        assert station_tracks_result.batch_id == self.batch_id
        assert station_tracks_result.pumpkin == self.pumpkin
Ejemplo n.º 2
0
    def rotor_station_genre_tracks(self,
                                   genre: str,
                                   timeout=None,
                                   *args,
                                   **kwargs):
        url = f'{self.base_url}/rotor/station/genre:{genre}/tracks'

        result = self._request.get(url, timeout=timeout, *args, **kwargs)

        return StationTracksResult.de_json(result, self)
 def test_de_json_none(self, client):
     assert StationTracksResult.de_json({}, client) is None