home-assistant-core/tests/components/opower/conftest.py
tronikos 4e7d8b579a
Address Opower review comments (#95763)
* Address comments

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update sensor.py

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-07-03 14:53:44 +02:00

24 lines
693 B
Python

"""Fixtures for the Opower integration tests."""
import pytest
from homeassistant.components.opower.const import DOMAIN
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
@pytest.fixture
def mock_config_entry(hass: HomeAssistant) -> MockConfigEntry:
"""Return the default mocked config entry."""
config_entry = MockConfigEntry(
title="Pacific Gas & Electric (test-username)",
domain=DOMAIN,
data={
"utility": "Pacific Gas and Electric Company (PG&E)",
"username": "test-username",
"password": "test-password",
},
)
config_entry.add_to_hass(hass)
return config_entry