3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/home-assistant
Martin Weinelt 22437644f9
home-assistant: disable failing test in mobile app component
____________________ test_webhook_handle_get_config[pyloop] ____________________
[gw18] linux -- Python 3.8.9 /nix/store/q6gfck5czr67090pwm53xrdyhpg6bx67-python3-3.8.9/bin/python3.8

hass = <homeassistant.core.HomeAssistant object at 0x7ffe4e71f370>
create_registrations = ({'cloudhook_url': None, 'remote_ui_url': None, 'secret': 'ed8ac650f2b5865733d2cea4ad1b6b02bcfbdcc3e527524bc1c457d5c6f...emote_ui_url': None, 'secret': None, 'webhook_id': '558fde83113d48024a427ccf004e2d2bdf7c56646c6a5a953566c272d51f1bfc'})
webhook_client = <aiohttp.test_utils.TestClient object at 0x7ffe4e640ca0>

    async def test_webhook_handle_get_config(hass, create_registrations, webhook_client):
        """Test that we can get config properly."""
        resp = await webhook_client.post(
            "/api/webhook/{}".format(create_registrations[1]["webhook_id"]),
            json={"type": "get_config"},
        )

        assert resp.status == 200

        json = await resp.json()
        if "components" in json:
            json["components"] = set(json["components"])
        if "allowlist_external_dirs" in json:
            json["allowlist_external_dirs"] = set(json["allowlist_external_dirs"])

        hass_config = hass.config.as_dict()

        expected_dict = {
            "latitude": hass_config["latitude"],
            "longitude": hass_config["longitude"],
            "elevation": hass_config["elevation"],
            "unit_system": hass_config["unit_system"],
            "location_name": hass_config["location_name"],
            "time_zone": hass_config["time_zone"],
            "components": hass_config["components"],
            "version": hass_config["version"],
            "theme_color": "#03A9F4",  # Default frontend theme color
        }

>       assert expected_dict == json
E       AssertionError: assert {'components'...st home', ...} == {'components'...st home', ...}
E         Omitting 8 identical items, use -vv to show
E         Differing items:
E         {'theme_color': '#03A9F4'} != {'theme_color': 'blue'}
E         Use -v to get the full diff

tests/components/mobile_app/test_webhook.py:231: AssertionError
2021-05-17 03:44:03 +02:00
..
appdaemon.nix appdaemon: 4.0.5 -> 4.0.8 2021-04-18 19:32:43 +02:00
cli.nix home-assistant-cli: 0.9.1 -> 0.9.3 2021-04-12 16:41:31 +02:00
component-packages.nix home-assistant: 2021.5.3 -> 2021.5.4 2021-05-15 01:53:39 +02:00
default.nix home-assistant: disable failing test in mobile app component 2021-05-17 03:44:03 +02:00
frontend.nix home-assistant: 2021.4.6 -> 2021.5.0 2021-05-06 04:45:55 +02:00
parse-requirements.py home-assistant: find unstable versions in parse-requirements.py 2021-04-23 02:00:52 +02:00
update.sh home-assistant: fix packagen name in update.sh 2021-01-07 13:33:10 +01:00