def test_de_json_required(self, client, station, rotor_settings, ad_params): json_dict = {'station': station.to_dict(), 'settings': rotor_settings.to_dict(), 'settings2': rotor_settings.to_dict(), 'ad_params': ad_params.to_dict()} station_result = StationResult.de_json(json_dict, client) assert station_result.station == station assert station_result.settings == rotor_settings assert station_result.settings2 == rotor_settings assert station_result.ad_params == ad_params
def test_de_json_all(self, client, station, rotor_settings, ad_params): json_dict = {'station': station.to_dict(), 'settings': rotor_settings.to_dict(), 'settings2': rotor_settings.to_dict(), 'ad_params': ad_params.to_dict(), 'explanation': self.explanation, 'prerolls': self.prerolls} station_result = StationResult.de_json(json_dict, client) assert station_result.station == station assert station_result.settings == rotor_settings assert station_result.settings2 == rotor_settings assert station_result.ad_params == ad_params assert station_result.explanation == self.explanation assert station_result.prerolls == self.prerolls
def test_de_json_none(self, client): assert StationResult.de_json({}, client) is None