mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 10:38:38 +00:00
fix tests
This commit is contained in:
@@ -14,7 +14,11 @@ async def test_gpio_pin_expression__conf_is_none(monkeypatch):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_register_component(monkeypatch):
|
||||
var = Mock(base="foo.bar")
|
||||
base_mock = Mock()
|
||||
base_mock.__str__ = lambda self: "foo.bar"
|
||||
base_mock.type = Mock()
|
||||
base_mock.type.__str__ = lambda self: "foo::Bar"
|
||||
var = Mock(base=base_mock)
|
||||
|
||||
app_mock = Mock(register_component_=Mock(return_value=var))
|
||||
monkeypatch.setattr(ch, "App", app_mock)
|
||||
@@ -46,7 +50,11 @@ async def test_register_component__no_component_id(monkeypatch):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_register_component__with_setup_priority(monkeypatch):
|
||||
var = Mock(base="foo.bar")
|
||||
base_mock = Mock()
|
||||
base_mock.__str__ = lambda self: "foo.bar"
|
||||
base_mock.type = Mock()
|
||||
base_mock.type.__str__ = lambda self: "foo::Bar"
|
||||
var = Mock(base=base_mock)
|
||||
|
||||
app_mock = Mock(register_component_=Mock(return_value=var))
|
||||
monkeypatch.setattr(ch, "App", app_mock)
|
||||
|
||||
Reference in New Issue
Block a user