Skip to content

Commit

Permalink
format tests
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Feb 12, 2024
1 parent 65428a5 commit 5659ce3
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ disable=
broad-except,
too-many-lines,
too-many-locals,
abstract-method,

[REFACTORING]

Expand Down
13 changes: 7 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fixtures for Mail and Packages tests."""

import asyncio
import aiohttp
import datetime
Expand All @@ -18,6 +19,12 @@
pytestmark = pytest.mark.asyncio


@pytest.fixture(autouse=True)
def auto_enable_custom_integrations(enable_custom_integrations):
"""Enable custom integration tests."""
yield


@pytest.fixture()
def mock_update():
"""Mock email data update class values."""
Expand Down Expand Up @@ -1488,9 +1495,3 @@ def mock_update_amazon_image():
# value = mock.Mock()
mock_update.return_value = FAKE_UPDATE_DATA_BIN
yield mock_update


@pytest.fixture(autouse=True)
def auto_enable_custom_integrations(enable_custom_integrations):
"""Enable custom integration tests."""
yield
1 change: 1 addition & 0 deletions tests/test_binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test Mail and Packages binary sensors."""

import pytest
from pytest_homeassistant_custom_component.common import MockConfigEntry
from sqlalchemy import true
Expand Down
1 change: 1 addition & 0 deletions tests/test_camera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for camera component."""

import logging
import pytest
from unittest.mock import mock_open, patch
Expand Down
1 change: 1 addition & 0 deletions tests/test_diagnostics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the Mail and Packages diagnostics."""

from unittest.mock import patch

import pytest
Expand Down
4 changes: 3 additions & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for helpers module."""

import datetime
import errno
from freezegun import freeze_time
Expand Down Expand Up @@ -763,7 +764,8 @@ async def test_dhl_no_utf8(hass, mock_imap_dhl_no_utf8, caplog):
result = get_count(mock_imap_dhl_no_utf8, "dhl_delivering", True, "./", hass)
assert result["count"] == 1
assert result["tracking"] == ["4212345678"]
#assert "UTF-8 not supported: ('BAD', ['Unsupported'])" in caplog.text
# assert "UTF-8 not supported: ('BAD', ['Unsupported'])" in caplog.text


# TODO: Get updated hermes email
# @pytest.mark.asyncio
Expand Down
1 change: 1 addition & 0 deletions tests/test_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Test Mail and Packages sensors."""

import pytest
from pytest_homeassistant_custom_component.common import MockConfigEntry

Expand Down

0 comments on commit 5659ce3

Please sign in to comment.