diff --git a/tests/core/test_dashboard_defaults.py b/tests/core/test_dashboard_defaults.py index 9a2cdb5..5f11fe3 100644 --- a/tests/core/test_dashboard_defaults.py +++ b/tests/core/test_dashboard_defaults.py @@ -1,5 +1,6 @@ """The dashboard starts from a curated layout, the duplicate widgets are gone, and the Overview says what each number counts (#5213).""" +import re from datetime import datetime, timedelta, timezone from types import SimpleNamespace @@ -127,7 +128,7 @@ async def test_the_hosts_widget_gives_a_verdict_and_load_against_cores(app): assert page.index("VDNT-Util01") < page.index("VDNT-Docker02") assert "16.8 / 8 cores" in page and "0.9 / 4 cores" in page assert "agent last reported" in page - assert page.count("") == 5 and ">ping<" not in page and "24h" not in page + assert len(re.findall(r"]", page)) == 5 and ">ping<" not in page and "24h" not in page assert not hex_colours(page), hex_colours(page)