From ca8d18552c62494e4fe3ef140169f1f12dc77d3b Mon Sep 17 00:00:00 2001 From: zhudhjen Date: Wed, 7 Aug 2024 13:05:39 -0700 Subject: [PATCH] Fix test by add default args of port --- tests/dashboard/test_web_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/dashboard/test_web_server.py b/tests/dashboard/test_web_server.py index 74b4c671c9..9cc2c8feb8 100644 --- a/tests/dashboard/test_web_server.py +++ b/tests/dashboard/test_web_server.py @@ -41,6 +41,7 @@ async def fixture_dashboard() -> DashboardTestHelper: args = Mock( ha_addon=True, configuration=get_fixture_path("conf"), + port=0, ) os.environ["ESPHOME_DASHBOARD_PORT"] = str(port) DASHBOARD.settings.parse_args(args) @@ -52,7 +53,7 @@ async def fixture_dashboard() -> DashboardTestHelper: assert DASHBOARD.settings.using_password is False assert DASHBOARD.settings.on_ha_addon is True assert DASHBOARD.settings.using_auth is False - assert DASHBOARD.settings.port is port + assert int(DASHBOARD.settings.port) == port task = asyncio.create_task(DASHBOARD.async_run()) client = AsyncHTTPClient() io_loop = IOLoop(make_current=False)