Bump pycfdns from 2.0.1 to 3.0.0 (#103426)

This commit is contained in:
Joakim Sørensen 2023-11-06 11:05:44 +01:00 committed by GitHub
parent 779b19ca46
commit 6d567c3e0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 225 additions and 135 deletions

View file

@ -3,15 +3,15 @@ from unittest.mock import patch
import pytest
from . import _get_mock_cfupdate
from . import _get_mock_client
@pytest.fixture
def cfupdate(hass):
"""Mock the CloudflareUpdater for easier testing."""
mock_cfupdate = _get_mock_cfupdate()
mock_cfupdate = _get_mock_client()
with patch(
"homeassistant.components.cloudflare.CloudflareUpdater",
"homeassistant.components.cloudflare.pycfdns.Client",
return_value=mock_cfupdate,
) as mock_api:
yield mock_api
@ -20,9 +20,9 @@ def cfupdate(hass):
@pytest.fixture
def cfupdate_flow(hass):
"""Mock the CloudflareUpdater for easier config flow testing."""
mock_cfupdate = _get_mock_cfupdate()
mock_cfupdate = _get_mock_client()
with patch(
"homeassistant.components.cloudflare.config_flow.CloudflareUpdater",
"homeassistant.components.cloudflare.pycfdns.Client",
return_value=mock_cfupdate,
) as mock_api:
yield mock_api