def test_temperature_sensor(self):
    'Test temperature sensor with fahrenheit.'
    device = mock_device(10, 'Family Room', 'Canary')
    location = mock_location('Home', False)
    data = Mock()
    data.get_reading.return_value = 21.1234
    sensor = CanarySensor(data, SENSOR_TYPES[0], location, device)
    sensor.update()
    assert ('Home Family Room Temperature' == sensor.name)
    assert ('°C' == sensor.unit_of_measurement)
    assert (21.12 == sensor.state)
    assert ('mdi:thermometer' == sensor.icon)
Test temperature sensor with fahrenheit.
def test_temperature_sensor(self):
    
    device = mock_device(10, 'Family Room', 'Canary')
    location = mock_location('Home', False)
    data = Mock()
    data.get_reading.return_value = 21.1234
    sensor = CanarySensor(data, SENSOR_TYPES[0], location, device)
    sensor.update()
    assert ('Home Family Room Temperature' == sensor.name)
    assert ('°C' == sensor.unit_of_measurement)
    assert (21.12 == sensor.state)
    assert ('mdi:thermometer' == sensor.icon)