Temporarily set apprise log level to debug in tests (#121029)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
9749cf113a
commit
7d31d553d0
1 changed files with 13 additions and 0 deletions
|
@ -1,14 +1,27 @@
|
|||
"""The tests for the apprise notification platform."""
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
BASE_COMPONENT = "notify"
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def reset_log_level():
|
||||
"""Set and reset log level after each test case."""
|
||||
logger = logging.getLogger("apprise")
|
||||
orig_level = logger.level
|
||||
logger.setLevel(logging.DEBUG)
|
||||
yield
|
||||
logger.setLevel(orig_level)
|
||||
|
||||
|
||||
async def test_apprise_config_load_fail01(hass: HomeAssistant) -> None:
|
||||
"""Test apprise configuration failures 1."""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue