def test_wifi_sensor(self):
    'Test battery sensor.'
    device = mock_device(10, 'Family Room', 'Canary Flex')
    location = mock_location('Home')
    data = Mock()
    data.get_reading.return_value = (- 57)
    sensor = CanarySensor(data, SENSOR_TYPES[3], location, device)
    sensor.update()
    assert ('Home Family Room Wifi' == sensor.name)
    assert ('dBm' == sensor.unit_of_measurement)
    assert ((- 57) == sensor.state)
    assert ('mdi:wifi' == sensor.icon)
Test battery sensor.
def test_wifi_sensor(self):
    
    device = mock_device(10, 'Family Room', 'Canary Flex')
    location = mock_location('Home')
    data = Mock()
    data.get_reading.return_value = (- 57)
    sensor = CanarySensor(data, SENSOR_TYPES[3], location, device)
    sensor.update()
    assert ('Home Family Room Wifi' == sensor.name)
    assert ('dBm' == sensor.unit_of_measurement)
    assert ((- 57) == sensor.state)
    assert ('mdi:wifi' == sensor.icon)