From 6bb9011db3735d0f3a4c9bcc5d302c90f7d7e9ec Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Tue, 11 Jun 2024 17:57:58 +0200
Subject: [PATCH] Fix use-implicit-booleaness-not-len warnings in tests
 (#119407)

---
 tests/components/alexa/test_smart_home.py      | 2 +-
 tests/components/unifiprotect/test_services.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/components/alexa/test_smart_home.py b/tests/components/alexa/test_smart_home.py
index 43d92f1a533..d502dce7d01 100644
--- a/tests/components/alexa/test_smart_home.py
+++ b/tests/components/alexa/test_smart_home.py
@@ -5643,6 +5643,6 @@ async def test_alexa_config(
     with patch.object(test_config, "_auth", AsyncMock()):
         test_config._auth.async_invalidate_access_token = MagicMock()
         test_config.async_invalidate_access_token()
-        assert len(test_config._auth.async_invalidate_access_token.mock_calls)
+        assert len(test_config._auth.async_invalidate_access_token.mock_calls) == 1
         await test_config.async_accept_grant("grant_code")
         test_config._auth.async_do_auth.assert_called_once_with("grant_code")
diff --git a/tests/components/unifiprotect/test_services.py b/tests/components/unifiprotect/test_services.py
index 919af53ef10..0a90a2d5667 100644
--- a/tests/components/unifiprotect/test_services.py
+++ b/tests/components/unifiprotect/test_services.py
@@ -233,4 +233,4 @@ async def test_remove_privacy_zone(
         blocking=True,
     )
     ufp.api.update_device.assert_called()
-    assert not len(doorbell.privacy_zones)
+    assert not doorbell.privacy_zones
-- 
GitLab