Skip to content

Commit

Permalink
Merge pull request #156 from agittins/fix-tests
Browse files Browse the repository at this point in the history
Finally resolved failing tests workflow.

fix loading of bluetooth_adapters in tests
  • Loading branch information
agittins committed Apr 6, 2024
2 parents 847e9c6 + f3a8151 commit c602efa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions requirements_test.txt
Expand Up @@ -5,5 +5,7 @@ pytest-homeassistant-custom-component
pre-commit
isort
black==24.3.0
# AJG 2024-04-07: github not completing tests due to this.
pyudev
pyserial-asyncio==0.6
pyserial==3.5
10 changes: 5 additions & 5 deletions tests/conftest.py
Expand Up @@ -14,6 +14,11 @@
pytest_plugins = "pytest_homeassistant_custom_component"


@pytest.fixture(autouse=True)
def mock_bluetooth(enable_bluetooth):
"""Auto mock bluetooth."""


# This fixture enables loading custom integrations in all tests.
# Remove to enable selective use of this fixture
@pytest.fixture(autouse=True)
Expand Down Expand Up @@ -60,11 +65,6 @@ def error_get_data_fixture():
yield


@pytest.fixture(autouse=True)
def mock_bluetooth(enable_bluetooth):
"""Auto mock bluetooth."""


# This fixture ensures that the config flow gets service info for the anticipated address
# to go into configured_devices
@pytest.fixture(autouse=True)
Expand Down
1 change: 1 addition & 0 deletions tests/test_config_flow.py
Expand Up @@ -7,6 +7,7 @@
import pytest
from homeassistant import config_entries
from homeassistant import data_entry_flow
from homeassistant.core import HomeAssistant # noqa: F401
from pytest_homeassistant_custom_component.common import MockConfigEntry

from custom_components.bermuda.const import DOMAIN
Expand Down

0 comments on commit c602efa

Please sign in to comment.