Prevent 3rd party lib from opening sockets in samsungtv tests (#56334)

This commit is contained in:
Erik Montnemery 2021-09-19 10:24:27 +02:00 committed by GitHub
parent 80a57f5118
commit ec52763706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 13 deletions

View file

@ -112,3 +112,10 @@ def delay_fixture():
def mock_now():
"""Fixture for dtutil.now."""
return dt_util.utcnow()
@pytest.fixture(name="no_mac_address")
def mac_address_fixture():
"""Patch getmac.get_mac_address."""
with patch("getmac.get_mac_address", return_value=None) as mac:
yield mac