def test_setup_sensors(self):
    'Test the sensor setup.'
    online_device_at_home = mock_device(20, 'Dining Room', True, 'Canary')
    offline_device_at_home = mock_device(21, 'Front Yard', False, 'Canary')
    online_device_at_work = mock_device(22, 'Office', True, 'Canary')
    self.hass.data[DATA_CANARY] = Mock()
    self.hass.data[DATA_CANARY].locations = [mock_location('Home', True, devices=[online_device_at_home, offline_device_at_home]), mock_location('Work', True, devices=[online_device_at_work])]
    canary.setup_platform(self.hass, self.config, self.add_entities, None)
    assert (6 == len(self.DEVICES))
Test the sensor setup.
def test_setup_sensors(self):
    
    online_device_at_home = mock_device(20, 'Dining Room', True, 'Canary')
    offline_device_at_home = mock_device(21, 'Front Yard', False, 'Canary')
    online_device_at_work = mock_device(22, 'Office', True, 'Canary')
    self.hass.data[DATA_CANARY] = Mock()
    self.hass.data[DATA_CANARY].locations = [mock_location('Home', True, devices=[online_device_at_home, offline_device_at_home]), mock_location('Work', True, devices=[online_device_at_work])]
    canary.setup_platform(self.hass, self.config, self.add_entities, None)
    assert (6 == len(self.DEVICES))