def test_repr_with_data(self, _): api = NuHeat(None, None) serial_number = "serial-123" thermostat = NuHeatThermostat(api, serial_number) thermostat.temperature = 2000 thermostat.target_temperature = 5000 self.assertEqual( str(thermostat), "<NuHeatThermostat id='{}' temperature='{}F / {}C' target='{}F / {}C'>" .format(serial_number, 68, 20, 122, 50))
def test_celsius(self, _): thermostat = NuHeatThermostat(None, None) thermostat.temperature = 2222 self.assertEqual(thermostat.celsius, 22)
def test_fahrenheit(self, _): thermostat = NuHeatThermostat(None, None) thermostat.temperature = 2222 self.assertEqual(thermostat.fahrenheit, 72)