nixpkgs/pkgs/servers/home-assistant
Martin Weinelt 71e8cc09d1
home-assistant: disable adbode/test_camera.py::test_camera_off test
```
___________________________ test_camera_off[pyloop] ____________________________
[gw5] linux -- Python 3.8.9 /nix/store/4s0h5aawbap3xhldxhcijvl26751qrjr-python3-3.8.9/bin/python3.8

hass = <homeassistant.core.HomeAssistant object at 0x7fff4433b580>

    async def test_camera_off(hass):
        """Test the camera turn off service."""
        await setup_platform(hass, CAMERA_DOMAIN)

        with patch("abodepy.AbodeCamera.privacy_mode") as mock_capture:
>           await hass.services.async_call(
                CAMERA_DOMAIN,
                "turn_off",
                {ATTR_ENTITY_ID: "camera.test_cam"},
                blocking=True,
            )

hass       = <homeassistant.core.HomeAssistant object at 0x7fff4433b580>
mock_capture = <MagicMock name='privacy_mode' id='140734337787888'>

tests/components/abode/test_camera.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <homeassistant.core.ServiceRegistry object at 0x7fff442c1cd0>
domain = 'camera', service = 'turn_off'
service_data = {'entity_id': 'camera.test_cam'}, blocking = True
context = Context(user_id=None, parent_id=None, id='20e520e6917f171d80558dcc4b10b219')
limit = 10, target = None

    async def async_call(
        self,
        domain: str,
        service: str,
        service_data: dict | None = None,
        blocking: bool = False,
        context: Context | None = None,
        limit: float | None = SERVICE_CALL_LIMIT,
        target: dict | None = None,
    ) -> bool | None:
        """
        Call a service.

        Specify blocking=True to wait until service is executed.
        Waits a maximum of limit, which may be None for no timeout.

        If blocking = True, will return boolean if service executed
        successfully within limit.

        This method will fire an event to indicate the service has been called.

        Because the service is sent as an event you are not allowed to use
        the keys ATTR_DOMAIN and ATTR_SERVICE in your service_data.

        This method is a coroutine.
        """
        domain = domain.lower()
        service = service.lower()
        context = context or Context()
        service_data = service_data or {}

        try:
            handler = self._services[domain][service]
        except KeyError:
>           raise ServiceNotFound(domain, service) from None
E           homeassistant.exceptions.ServiceNotFound: Unable to find service camera.turn_off

blocking   = True
context    = Context(user_id=None, parent_id=None, id='20e520e6917f171d80558dcc4b10b219')
domain     = 'camera'
limit      = 10
self       = <homeassistant.core.ServiceRegistry object at 0x7fff442c1cd0>
service    = 'turn_off'
service_data = {'entity_id': 'camera.test_cam'}
target     = None

homeassistant/core.py:1438: ServiceNotFound
---------------------------- Captured stderr setup -----------------------------
DEBUG:asyncio:Using selector: EpollSelector
------------------------------ Captured log setup ------------------------------
DEBUG    asyncio:selector_events.py:59 Using selector: EpollSelector
----------------------------- Captured stderr call -----------------------------
INFO:homeassistant.loader:Loaded abode from homeassistant.components.abode
INFO:homeassistant.setup:Setting up abode
INFO:homeassistant.setup:Setup of domain abode took 0.0 seconds
DEBUG:abodepy:Cache found at: /build/source/tests/testing_config/abodepy_cache.pickle
WARNING:abodepy.utils:Empty pickle file: /build/source/tests/testing_config/abodepy_cache.pickle
DEBUG:abodepy:Removing invalid cache file: /build/source/tests/testing_config/abodepy_cache.pickle
ERROR:homeassistant.config_entries:Error setting up entry Mock Title for abode
Traceback (most recent call last):
  File "/build/source/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/build/source/homeassistant/components/abode/__init__.py", line 125, in async_setup_entry
    abode = await hass.async_add_executor_job(
  File "/nix/store/4s0h5aawbap3xhldxhcijvl26751qrjr-python3-3.8.9/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/nix/store/6s0sdvk0crvcfyv7w33yc7w4bkzl0y1w-python3.8-abodepy-1.2.1/lib/python3.8/site-packages/abodepy/__init__.py", line 85, in __init__
    self._load_cache()
  File "/nix/store/6s0sdvk0crvcfyv7w33yc7w4bkzl0y1w-python3.8-abodepy-1.2.1/lib/python3.8/site-packages/abodepy/__init__.py", line 497, in _load_cache
    os.remove(self._cache_path)
FileNotFoundError: [Errno 2] No such file or directory: '/build/source/tests/testing_config/abodepy_cache.pickle'
DEBUG:homeassistant.core:Bus:Handling <Event component_loaded[L]:
component=abode>
```
2021-06-20 20:11:45 +02:00
..
appdaemon.nix pythonPackages: websocket_client -> websocket-client 2021-06-15 22:03:10 +02:00
cli.nix home-assistant-cli: 0.9.1 -> 0.9.3 2021-04-12 16:41:31 +02:00
component-packages.nix Merge pull request #127580 from dotlambda/herepy-init 2021-06-20 18:54:54 +02:00
default.nix home-assistant: disable adbode/test_camera.py::test_camera_off test 2021-06-20 20:11:45 +02:00
frontend.nix home-assistant: 2021.6.0 -> 2021.6.1 2021-06-11 11:44:37 +02:00
parse-requirements.py home-assistant: don't treat frontend specially in parse-requirements.py 2021-06-16 10:36:20 +02:00
update.sh home-assistant: fix home-assistant-frontend update 2021-06-16 00:27:19 +02:00