Esempio n. 1
0
    def test_de_json_all(self, client, station_result):
        json_dict = {
            'dashboard_id': self.dashboard_id,
            'stations': [station_result.to_dict()],
            'pumpkin': self.pumpkin
        }
        dashboard = Dashboard.de_json(json_dict, client)

        assert dashboard.dashboard_id == self.dashboard_id
        assert dashboard.stations == [station_result]
        assert dashboard.pumpkin == self.pumpkin
Esempio n. 2
0
    def rotor_stations_dashboard(self, timeout=None, *args, **kwargs):
        url = f'{self.base_url}/rotor/stations/dashboard'

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

        return Dashboard.de_json(result, self)
Esempio n. 3
0
 def test_de_json_none(self, client):
     assert Dashboard.de_json({}, client) is None