2021-11-15 17:18:57 +00:00
|
|
|
"""Tests for the Network Configuration integration."""
|
|
|
|
|
2024-07-01 10:09:11 +00:00
|
|
|
from collections.abc import Generator
|
2024-06-02 13:34:30 +00:00
|
|
|
from unittest.mock import _patch
|
|
|
|
|
2021-11-15 17:18:57 +00:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
2024-05-08 21:42:35 +00:00
|
|
|
def mock_network():
|
|
|
|
"""Override mock of network util's async_get_adapters."""
|
2022-07-14 09:05:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
2024-06-02 13:34:30 +00:00
|
|
|
def override_mock_get_source_ip(
|
|
|
|
mock_get_source_ip: _patch,
|
2024-06-06 15:28:59 +00:00
|
|
|
) -> Generator[None]:
|
2024-05-08 21:42:35 +00:00
|
|
|
"""Override mock of network util's async_get_source_ip."""
|
|
|
|
mock_get_source_ip.stop()
|
|
|
|
yield
|
|
|
|
mock_get_source_ip.start()
|