* fix review requests from #35370 * fix pylint W0621 (redefined-outer-name)
This commit is contained in:
1 parent
8258fa515d
commit
93fddbed2b
9 files changed
+32
-24
No files matched your search
@@ -71,7 +71,7 @@ def config_fixture():
|
||||
|
||||
|
||||
@pytest.fixture(name="feature")
|
||||
def feature(request):
|
||||
def feature_fixture(request):
|
||||
"""Return an entity wrapper from given fixture name."""
|
||||
return request.getfixturevalue(request.param)
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ def create_valid_feature_mock(path="homeassistant.components.blebox.Products"):
|
||||
return feature
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def valid_feature_mock():
|
||||
@pytest.fixture(name="valid_feature_mock")
|
||||
def valid_feature_mock_fixture():
|
||||
"""Return a valid, complete BleBox feature mock."""
|
||||
return create_valid_feature_mock()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def flow_feature_mock():
|
||||
@pytest.fixture(name="flow_feature_mock")
|
||||
def flow_feature_mock_fixture():
|
||||
"""Return a mocked user flow feature."""
|
||||
return create_valid_feature_mock(
|
||||
"homeassistant.components.blebox.config_flow.Products"
|
||||
@@ -74,8 +74,8 @@ async def test_flow_works(hass, valid_feature_mock, flow_feature_mock):
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def product_class_mock():
|
||||
@pytest.fixture(name="product_class_mock")
|
||||
def product_class_mock_fixture():
|
||||
"""Return a mocked feature."""
|
||||
path = "homeassistant.components.blebox.config_flow.Products"
|
||||
patcher = patch(path, DEFAULT, blebox_uniapi.products.Products, True, True)
|
||||
|
||||
@@ -593,5 +593,5 @@ async def test_turn_on_failure(feature, hass, config, caplog):
|
||||
)
|
||||
|
||||
assert (
|
||||
f"turning on '{feature_mock.full_name}' failed: Bad value 123 ()" in caplog.text
|
||||
f"Turning on '{feature_mock.full_name}' failed: Bad value 123 ()" in caplog.text
|
||||
)
|
||||
Reference in new issue
Block a user