mirror of
https://github.com/home-assistant/core.git
synced 2026-11-29 01:02:03 -04:00
Cleanup unused loggers (#46510)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
"""The tests for the feedreader component."""
|
||||
from datetime import timedelta
|
||||
from logging import getLogger
|
||||
from os import remove
|
||||
from os.path import exists
|
||||
import time
|
||||
@@ -24,8 +23,6 @@ from homeassistant.setup import setup_component
|
||||
|
||||
from tests.common import get_test_home_assistant, load_fixture
|
||||
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
URL = "http://some.rss.local/rss_feed.xml"
|
||||
VALID_CONFIG_1 = {feedreader.DOMAIN: {CONF_URLS: [URL]}}
|
||||
VALID_CONFIG_2 = {feedreader.DOMAIN: {CONF_URLS: [URL], CONF_SCAN_INTERVAL: 60}}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Fixtures for harmony tests."""
|
||||
import logging
|
||||
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
|
||||
|
||||
from aioharmony.const import ClientCallbackType
|
||||
@@ -9,8 +8,6 @@ from homeassistant.components.harmony.const import ACTIVITY_POWER_OFF
|
||||
|
||||
from .const import NILE_TV_ACTIVITY_ID, PLAY_MUSIC_ACTIVITY_ID, WATCH_TV_ACTIVITY_ID
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ACTIVITIES_TO_IDS = {
|
||||
ACTIVITY_POWER_OFF: -1,
|
||||
"Watch TV": WATCH_TV_ACTIVITY_ID,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
"""Test the Logitech Harmony Hub activity switches."""
|
||||
|
||||
import logging
|
||||
|
||||
from homeassistant.components.harmony.const import DOMAIN
|
||||
from homeassistant.components.remote import ATTR_ACTIVITY, DOMAIN as REMOTE_DOMAIN
|
||||
from homeassistant.components.switch import (
|
||||
@@ -22,8 +19,6 @@ from .const import ENTITY_PLAY_MUSIC, ENTITY_REMOTE, ENTITY_WATCH_TV, HUB_NAME
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def test_switch_toggles(mock_hc, hass, mock_write_config):
|
||||
"""Ensure calls to the switch modify the harmony state."""
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""Tests for the Hyperion component."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from types import TracebackType
|
||||
from typing import Any, Dict, Optional, Type
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
@@ -63,8 +62,6 @@ TEST_AUTH_NOT_REQUIRED_RESP = {
|
||||
"info": {"required": False},
|
||||
}
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AsyncContextManagerMock(Mock):
|
||||
"""An async context manager mock for Hyperion."""
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
"""Tests for the Hyperion config flow."""
|
||||
|
||||
import logging
|
||||
from typing import Any, Dict, Optional
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
@@ -41,8 +39,6 @@ from . import (
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TEST_IP_ADDRESS = "192.168.0.1"
|
||||
TEST_HOST_PORT: Dict[str, Any] = {
|
||||
CONF_HOST: TEST_HOST,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for the Hyperion integration."""
|
||||
import logging
|
||||
from typing import Optional
|
||||
from unittest.mock import AsyncMock, Mock, call, patch
|
||||
|
||||
@@ -52,8 +51,6 @@ from . import (
|
||||
setup_test_config_entry,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
COLOR_BLACK = color_util.COLORS["black"]
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for the Hyperion integration."""
|
||||
import logging
|
||||
from unittest.mock import AsyncMock, call, patch
|
||||
|
||||
from hyperion.const import (
|
||||
@@ -35,7 +34,6 @@ TEST_COMPONENTS = [
|
||||
{"enabled": True, "name": "LEDDEVICE"},
|
||||
]
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
TEST_SWITCH_COMPONENT_BASE_ENTITY_ID = "switch.test_instance_1_component"
|
||||
TEST_SWITCH_COMPONENT_ALL_ENTITY_ID = f"{TEST_SWITCH_COMPONENT_BASE_ENTITY_ID}_all"
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
"""The tests for the litejet component."""
|
||||
import logging
|
||||
import unittest
|
||||
|
||||
from homeassistant.components import litejet
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestLiteJet(unittest.TestCase):
|
||||
"""Test the litejet component."""
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""The tests for the litejet component."""
|
||||
import logging
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
@@ -9,8 +8,6 @@ from homeassistant.components import litejet
|
||||
from tests.common import get_test_home_assistant
|
||||
from tests.components.scene import common
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ENTITY_SCENE = "scene.mock_scene_1"
|
||||
ENTITY_SCENE_NUMBER = 1
|
||||
ENTITY_OTHER_SCENE = "scene.mock_scene_2"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Test check_config script."""
|
||||
import logging
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
@@ -9,8 +8,6 @@ import homeassistant.scripts.check_config as check_config
|
||||
|
||||
from tests.common import get_test_config_dir, patch_yaml_files
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BASE_CONFIG = (
|
||||
"homeassistant:\n"
|
||||
" name: Home\n"
|
||||
|
||||
Reference in New Issue
Block a user