82 Commits

Author SHA1 Message Date
epenet
d6f4a79b46
Remove workaround for flaky translation tests (#131628) 2024-11-27 08:37:36 -06:00
epenet
2b939ce6ec
Add translation checks for service exceptions (#131266)
* Add translation checks for service exceptions

* Adjust

* Remove invalid comment
2024-11-27 08:46:45 +01:00
epenet
db198d4da2
Ignore flaky cloud translations (#131600) 2024-11-26 09:00:54 +01:00
epenet
3c3a6dff04
Add translation checks for issue registry (#130593) 2024-11-15 15:05:04 +01:00
epenet
0a2535cf8f
Fix missing argument in translation checks (#130674) 2024-11-15 09:51:28 +01:00
epenet
df55d198c8
Add translation checks for repair flows (#130619)
* Add translation checks for repair flows

* Ignore fake_integration in repairs
2024-11-14 17:25:47 +01:00
epenet
c7ee7dc880
Refactor translation checks (#130585)
* Refactor translation checks

* Adjust

* Improve

* Restore await

* Delay pytest.fail until the end of the test
2024-11-14 16:26:05 +01:00
epenet
94d597fd41
Add checks for flow title/description placeholders (#129140)
* Add checks for title placeholders

* Check both title and description

* Improve comment
2024-11-08 13:33:19 +01:00
epenet
a3ba7803db
Add checks for translation placeholders (#129963)
* Add checks for translation placeholders

* Remove async

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review
2024-11-07 13:12:00 +01:00
Mike Degatano
ed4f55406c
Replace Supervisor resolution API calls with aiohasupervisor (#129599)
* Replace Supervisor resolution API calls with aiohasupervisor

* Use consistent types to avoid uuid issues

* Fix mocking in http test

* Changes from feedback

* Put hass first

* Fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-07 01:33:51 +01:00
epenet
e6c20333b3
Remove dead code in translation checks (#129875) 2024-11-05 10:47:37 +01:00
Mike Degatano
673f0224c9
Continue migration of methods from handler to aiohasupervisor (#129183) 2024-10-29 14:33:21 +01:00
Mike Degatano
1649368cee
Bump aiohasupervisor to 0.2.0 (#129348) 2024-10-29 13:07:59 +01:00
Mike Degatano
5b2113c43d
Fix null hass error in supervisor update entities (#129030)
* Fix null hass error in supervisor update entities

* Share the supervisor client with coordinator

* Remove unnecessary patch of helper

* Attribute not property
2024-10-24 22:45:35 +02:00
Mike Degatano
ad55c9cc19
Remaining addon management to aiohasupervisor (#128484)
* Move set addon options to aiohasupervisor

* addon stats to aiohasupervisor and test fixes

* addon changelogs to aiohasupervisor

* Raise correct error for library in tests

* Cache client in instance property

* Use singleton method rather then HassIO instance method

* Mock supervisor client in more tests
2024-10-21 16:41:00 +02:00
epenet
120e17fa1e
Improve logic for detecting unused ignore translations (#128441) 2024-10-18 17:59:06 +02:00
epenet
0bc572787a
Add check for valid error code in translation checks in flows (#128445) 2024-10-16 19:03:24 +02:00
epenet
c5046f7809
Add check for valid abort reason translation in option flows (#128444) 2024-10-16 13:41:15 +02:00
epenet
8ae8fa7ec9
Add SOURCE_SYSTEM to DISCOVERY_SOURCES (#128457) 2024-10-16 11:27:48 +02:00
epenet
2542ddd30a
Improve check for user-visible flows when checking translations in tests (#128434)
* Improve check for user-visible flows when checking translations in tests

* Fix nest (from DHCP)

* Ignore homeassistant_hardware

* Improve logic
2024-10-15 14:09:53 +02:00
epenet
84b2c74057
Fail on unused ignore_translations fixture (#128422)
* Fail on unused ignore_translations fixture

* Cleanup melcloud

* Use pytest.fail

* Cleanup tplink

* Cleanup matter
2024-10-15 12:40:47 +02:00
epenet
f41494b7cc
Ensure config_flow abort reasons have translations (#128140)
* Ensure config_flow abort reasons have translations

* Ignore fake_integration in application_credentials

* Mark gardena_bluetooth as needs fixing

* Mark google as needs fixing

* Mark google_assistant_sdk as needs fixing

* Mark homewizard as needs fixing

* Mark homeworks as needs fixing

* Mark honeywell as needs fixing

* Mark jewish_calendar as needs fixing

* Mark lg_netcast as needs fixing

* Mark lifx as needs fixing

* Mark lyric as needs fixing

* Mark madvr as needs fixing

* Mark matter as needs fixing

* Mark melcloud as needs fixing

* Mark motioneye as needs fixing

* Mark ollama as needs fixing

* Mark philips_js as needs fixing

* Mark spotify as needs fixing

* Mark srp_energy as needs fixing

* Mark subaru as needs fixing

* Mark tplink as needs fixing

* Mark yolink as needs fixing

* Mark youtube as needs fixing

* Fix incorrect comment
2024-10-14 16:39:10 +02:00
Jan Bouwhuis
edb30af441
Fix hassio data fetching over list[Repository] (#128206)
* Fix hassio data fetching over list[Repository]

* Parameterize store mock and add store data to sensor tests
2024-10-12 14:44:26 +02:00
Mike Degatano
a9aa5ad229
Use aiohasupervisor for store APIs (#126780)
* Use aiohasupervosor for store addon info

* Use aiohasupervisor install addon

* Use aiohasupervisor for store info API

* Fix onboarding test

* Changes from feedback

* Move get_supervisor_client out of constructor

* Mock supervisor_client in tests

* Make property private
2024-10-10 10:27:20 +02:00
Mike Degatano
7517948900
Replace more addon management with aiohasupervisor (#126236)
* Replace start_addon with library call

* restart_addon to library and error issues in tests

* stop_addon to library

* uninstall_addon to library

* Add output typing

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-24 15:47:29 +02:00
Mike Degatano
97d0d91d2c
Use aiohasupervisor for addon info calls (#125926)
* Use aiohasupervisor for addon info calls

* Fix issue/repair tests in supervisor

* Fixes from feedback
2024-09-17 23:22:35 +02:00
epenet
bd2b72235e
Use root import in tests (#125862)
* Use root import in components

* One more
2024-09-13 06:42:32 +02:00
Jan Bouwhuis
44b6bca89a
Refactor and cleanup zwave_js fixtures to share them (#124485)
Refactor and cleanup zwave_js fixtures to use
2024-08-23 15:42:57 +02:00
Jan Bouwhuis
51dba1eec3
Cleanup redundant fixtures and move all other hassio addon fixtures to be shared (#124437) 2024-08-22 20:58:05 +02:00
Jan Bouwhuis
61114d8328
Install and start Mosquitto MQTT broker add on from MQTT config flow (#124106)
* Opt in to install Mosquitto broker add-on in MQTT config flow

* rephrase

* Tests with supervisor and running add-on

* Complete tests for success flows

* Also set up entry in success flow

* Use realistic names for addon and broker

* Finetuning and fail test cases

* Spelling

* Improve translation strings

* Update addon docstr

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Raise AddonError if add-on does not start

* Only show the option to use the add-on

* Simplify flow, rework and cleanup

* Revert unrelated cleanup, process suggestion

* Move ADDON_SLUG const to addon module

* Move fixture to component level

* Move back supervisor fixture

* Move addon_setup_time_fixture and superfixe to config flow model tests

* Refactor hassio fixture

* Rename helpers as they are no fixtures, remove fixture from their names

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-22 09:07:45 +02:00
Dave T
311b1e236a
Don't patch libraries that aren't installed in pytest (#121628) 2024-07-10 23:50:47 +02:00
Marc Mueller
ca55986057
Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
epenet
65befcf5d4
Fix import pylint warning in core tests (#119359) 2024-06-11 15:04:00 +02:00
Marc Mueller
279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
epenet
f178467b0e
Add type hints for TTS test fixtures (#118704) 2024-06-03 17:43:18 +02:00
epenet
77c627e6f3
Fix incorrect blueprint type hints in tests (#118694) 2024-06-03 10:19:13 +02:00
epenet
cddb057eae
Adjust conftest type hints (#117900) 2024-05-22 09:34:17 +02:00
Jan-Philipp Benecke
c2ffed9b2d
Use switch entities instead of toggle entities in tests (#114585) 2024-04-02 08:25:28 +02:00
Sid
dc557fca1e
Refactor conversation mock_agent (#114428)
* Refactor conversation mock_agent

* Address review comments
2024-03-29 14:38:58 +01:00
Jan-Philipp Benecke
530552b4f5
Use mock_platform for device_tracker entity component tests instead of hass.components (#114398)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-28 15:23:21 -10:00
Jan-Philipp Benecke
71a0a7fe00
Use setup_test_component_platform helper for switch entity component tests instead of hass.components (#114305)
* Use `setup_test_component_platform` helper for switch entity component tests instead of `hass.components`

* Do not import fixtures

* Re-add switch.py to testing_config as stub

* Rename to mock_toggle_entities
2024-03-28 13:56:23 +01:00
Jan-Philipp Benecke
22b14d83e8
Use setup_test_component_platform helper for sensor entity component tests instead of hass.components (#114316)
* Use `setup_test_component_platform` helper for sensor entity component tests instead of `hass.components`

* Missing file

* Fix import

* Remove invalid device class
2024-03-28 12:07:55 +01:00
Jan-Philipp Benecke
9580adfde9
Use new setup_test_component_platform helper instead of test fixture for light platform (#114200) 2024-03-26 00:17:16 +01:00
Jan-Philipp Benecke
ff6812a798
Split light fixture from implementation to only import when fixture is actually used (#113892)
* Split light fixture from implementation to only import when fixture is actually used

* Non-local import
2024-03-21 10:49:32 +01:00
Marc Mueller
38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick Koston
a0bf170fb4
Avoid ffmpeg subprocess for many component tests (#105354) 2023-12-09 19:41:37 +01:00
Franck Nijhof
7ec2980e52
Change pytest fixture scope from core fixtures (#104831) 2023-12-01 07:14:13 +01:00
Jan Bouwhuis
ec98e22330
Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik Montnemery
3cca338c6e
Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
Erik Montnemery
3fc0c9a325
Improve TTS test fixtures (#93517) 2023-05-25 11:59:20 +02:00