Skip to content

Commit d7d36c2

Browse files
Bump ta-cmi from 2.1.2 to 2.2.0 (#38)
* Bump ta-cmi from 2.1.2 to 2.2.0 Bumps [ta-cmi](https://gitlab.com/DeerMaximum/ta-cmi) from 2.1.2 to 2.2.0. - [Release notes](https://gitlab.com/DeerMaximum/ta-cmi/tags) - [Commits](https://gitlab.com/DeerMaximum/ta-cmi/compare/v2.1.2...v2.2.0) --- updated-dependencies: - dependency-name: ta-cmi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump version in manifest.json * Fix tests --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: DeerMaximum <[email protected]>
1 parent 2ec0baa commit d7d36c2

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

custom_components/ta_coe/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"documentation": "https://github.com/DeerMaximum/Technische-Alternative-CoE",
88
"iot_class": "local_polling",
99
"issue_tracker": "https://github.com/DeerMaximum/Technische-Alternative-CoE/issues",
10-
"requirements": ["ta-cmi==2.1.2"],
10+
"requirements": ["ta-cmi==2.2.0"],
1111
"version": "1.3.0"
1212
}

requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ta-cmi==2.1.2
1+
ta-cmi==2.2.0
22

33
#Test will fail witout
44
aiohttp_cors

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
COE_SEND_ANALOG_VALUES_PACKAGE = "ta_cmi.coe.CoE.send_analog_values"
66
COE_SEND_DIGITAL_VALUES_PACKAGE = "ta_cmi.coe.CoE.send_digital_values"
77
COEAPI_RAW_REQUEST_PACKAGE = "ta_cmi.coe_api.CoEAPI._make_request_get"
8+
COE_VERSION_CHECK_PACKAGE = "ta_cmi.coe.CoE._check_version"
89
SETUP_ENTRY_PACKAGE = "custom_components.ta_coe.async_setup_entry"
910
STATE_AVAILABLE_PACKAGE = "homeassistant.core.StateMachine.get"
1011
STATE_SENDER_UPDATE_DIGITAL_MANUEL_PACKAGE = (

tests/conftest.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
"""Fixtures for testing."""
2+
from unittest import mock
3+
24
import pytest
35

6+
from tests import COE_VERSION_CHECK_PACKAGE
7+
48

59
@pytest.fixture(autouse=True)
610
def auto_enable_custom_integrations(enable_custom_integrations):
711
"""Enable enable_custom_integrations"""
812
yield
13+
14+
15+
@pytest.fixture(scope="session", autouse=True)
16+
def patch_coe_server_check(request):
17+
"""Patch the ta-cmi CoE server version check."""
18+
patched = mock.patch(COE_VERSION_CHECK_PACKAGE)
19+
patched.__enter__()
20+
21+
def unpatch():
22+
patched.__exit__(None, None, None)
23+
24+
request.addfinalizer(unpatch)

0 commit comments

Comments
 (0)