Просмотр исходного кода

Update tests to work with 2022.9

- additional field returned in config flow of 2022.9
- update required version for tests to ensure consistency
- update to latest tinytuya, which supports protocol 3.2
- bump version
Jason Rumney 3 лет назад
Родитель
Сommit
ee18df3901

+ 2 - 2
custom_components/tuya_local/manifest.json

@@ -2,11 +2,11 @@
     "domain": "tuya_local",
     "iot_class": "local_polling",
     "name": "Tuya Local",
-    "version": "0.18.3",
+    "version": "0.19.0",
     "documentation": "https://github.com/make-all/tuya-local",
     "issue_tracker": "https://github.com/make-all/tuya-local/issues",
     "dependencies": [],
     "codeowners": ["@make-all"],
-    "requirements": ["pycryptodome~=3.15.0","tinytuya~=1.6.4"],
+    "requirements": ["pycryptodome~=3.15.0","tinytuya~=1.6.6"],
     "config_flow": true
 }

+ 2 - 2
requirements-dev.txt

@@ -1,8 +1,8 @@
 black
 isort
-pytest-homeassistant-custom-component>=0.9.0
+pytest-homeassistant-custom-component>=0.11.19
 pytest
 pytest-asyncio
 pytest-cov
 pycryptodome~=3.15.0
-tinytuya~=1.6.4
+tinytuya~=1.6.6

+ 1 - 1
requirements.txt

@@ -1,2 +1,2 @@
 pycryptodome~=3.15.0
-tinytuya~=1.6.4
+tinytuya~=1.6.6

+ 1 - 0
tests/test_config_flow.py

@@ -431,6 +431,7 @@ async def test_flow_choose_entities_creates_config_entry(hass, bypass_setup):
         )
         expected = {
             "version": 9,
+            "context": {"source": "choose_entities"},
             "type": "create_entry",
             "flow_id": ANY,
             "handler": DOMAIN,