Ignore super-init-not-called pylint warnings in tests (#119474)
This commit is contained in:
parent
3d1165519d
commit
a0c445764c
5 changed files with 13 additions and 12 deletions
|
@ -11,6 +11,7 @@ MOCK_NAME = "Living Room Fan"
|
|||
class MockBAFDevice(Device):
|
||||
"""A simple mock for a BAF Device."""
|
||||
|
||||
# pylint: disable-next=super-init-not-called
|
||||
def __init__(self, async_wait_available_side_effect=None):
|
||||
"""Init simple mock."""
|
||||
self._async_wait_available_side_effect = async_wait_available_side_effect
|
||||
|
|
|
@ -25,7 +25,7 @@ from devolo_home_control_api.publisher.publisher import Publisher
|
|||
class BinarySensorPropertyMock(BinarySensorProperty):
|
||||
"""devolo Home Control binary sensor mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self._logger = MagicMock()
|
||||
self.element_uid = "Test"
|
||||
|
@ -38,7 +38,7 @@ class BinarySensorPropertyMock(BinarySensorProperty):
|
|||
class BinarySwitchPropertyMock(BinarySwitchProperty):
|
||||
"""devolo Home Control binary sensor mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self._logger = MagicMock()
|
||||
self.element_uid = "Test"
|
||||
|
@ -48,7 +48,7 @@ class BinarySwitchPropertyMock(BinarySwitchProperty):
|
|||
class ConsumptionPropertyMock(ConsumptionProperty):
|
||||
"""devolo Home Control binary sensor mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self._logger = MagicMock()
|
||||
self.element_uid = "devolo.Meter:Test"
|
||||
|
@ -61,7 +61,7 @@ class ConsumptionPropertyMock(ConsumptionProperty):
|
|||
class MultiLevelSensorPropertyMock(MultiLevelSensorProperty):
|
||||
"""devolo Home Control multi level sensor mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self.element_uid = "Test"
|
||||
self.sensor_type = "temperature"
|
||||
|
@ -73,7 +73,7 @@ class MultiLevelSensorPropertyMock(MultiLevelSensorProperty):
|
|||
class MultiLevelSwitchPropertyMock(MultiLevelSwitchProperty):
|
||||
"""devolo Home Control multi level switch mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self.element_uid = "Test"
|
||||
self.min = 4
|
||||
|
@ -85,7 +85,7 @@ class MultiLevelSwitchPropertyMock(MultiLevelSwitchProperty):
|
|||
class SirenPropertyMock(MultiLevelSwitchProperty):
|
||||
"""devolo Home Control siren mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self.element_uid = "Test"
|
||||
self.max = 0
|
||||
|
@ -98,7 +98,7 @@ class SirenPropertyMock(MultiLevelSwitchProperty):
|
|||
class SettingsMock(SettingsProperty):
|
||||
"""devolo Home Control settings mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self._logger = MagicMock()
|
||||
self.name = "Test"
|
||||
|
@ -109,7 +109,7 @@ class SettingsMock(SettingsProperty):
|
|||
class DeviceMock(Zwave):
|
||||
"""devolo Home Control device mock."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
def __init__(self) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self.status = 0
|
||||
self.brand = "devolo"
|
||||
|
@ -250,7 +250,7 @@ class SwitchMock(DeviceMock):
|
|||
class HomeControlMock(HomeControl):
|
||||
"""devolo Home Control gateway mock."""
|
||||
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
def __init__(self, **kwargs: Any) -> None: # pylint: disable=super-init-not-called
|
||||
"""Initialize the mock."""
|
||||
self.devices = {}
|
||||
self.publisher = MagicMock()
|
||||
|
|
|
@ -93,7 +93,7 @@ class FakeSubscriber(GoogleNestSubscriber):
|
|||
|
||||
stop_calls = 0
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self): # pylint: disable=super-init-not-called
|
||||
"""Initialize Fake Subscriber."""
|
||||
self._device_manager = DeviceManager()
|
||||
|
||||
|
|
|
@ -537,7 +537,7 @@ async def test_manual_config(hass: HomeAssistant, mock_plex_calls) -> None:
|
|||
class WrongCertValidaitionException(requests.exceptions.SSLError):
|
||||
"""Mock the exception showing an unmatched error."""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self): # pylint: disable=super-init-not-called
|
||||
self.__context__ = ssl.SSLCertVerificationError(
|
||||
"some random message that doesn't match"
|
||||
)
|
||||
|
|
|
@ -209,7 +209,7 @@ async def test_setup_when_certificate_changed(
|
|||
class WrongCertHostnameException(requests.exceptions.SSLError):
|
||||
"""Mock the exception showing a mismatched hostname."""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self): # pylint: disable=super-init-not-called
|
||||
self.__context__ = ssl.SSLCertVerificationError(
|
||||
f"hostname '{old_domain}' doesn't match"
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue