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
Erik Montnemery
68379dd55a
Improve TTS cache dir mocking ( #93468 )
2023-05-24 21:00:35 +02:00
epenet
69a46d4002
Adjust pylint plugin for components fixtures ( #90217 )
...
* Adjust pylint plugin for components fixtures
* Adjust components
* Use MagicMock
* Adjust
* Use None
2023-03-26 15:21:19 +02:00
J. Nick Koston
0c29b68cf8
Switch linear search to a dict lookup for ip bans ( #74482 )
2022-07-07 10:57:44 +02:00
J. Nick Koston
f1b400feaf
Revert changes from #70300 part 2 ( #70386 )
2022-04-21 10:50:00 -10:00
J. Nick Koston
309424d3b9
Prevent tests changing units from affecting other tests ( #70300 )
...
* Prevent tests changing temperature_unit from affecting other tests
* tweak
2022-04-19 11:38:52 -10:00
Franck Nijhof
dfdf5f2583
Add fixture for enabling disabled entities in WLED tests ( #68087 )
2022-03-14 09:50:55 +01:00
Marc Mueller
510a3ae915
Improve zeroconf test fixture ( #49657 )
2021-04-25 08:16:38 -10:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
J. Nick Koston
444df4a7d2
Use the shared zeroconf instance when attempting to create another Zeroconf instance ( #38744 )
2020-08-12 16:08:33 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Martin Hjelmare
c3decc6531
Do not ban supervisor ip if set ( #33781 )
...
* Use asynctest patch instead of mock_coro
* Add test for supervisor ip ban
* Do not ban supervisor ip if set
* Extract supervisor ip helper
* Check supervisor ip before banning
* Remove added blank line
* Clean up get supervisor ip
Co-Authored-By: Pascal Vizeli <pvizeli@syshack.ch>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-04-08 10:31:44 -07:00
Paulus Schoutsen
b9aba30a6e
Extract Collection helper from Person integration ( #30313 )
...
* Add CRUD foundation
* Use collection helper in person integration
* Lint/pytest
* Add tests
* Lint
* Create notification
2020-01-03 21:37:11 +01:00
Bas Nijholt
74c0219d0c
sort imports according to PEP8 for components ( #29609 )
2019-12-08 13:46:04 +01:00
Paulus Schoutsen
3231e22ddf
Remove direct authentication via trusted networks or API password ( #27656 )
...
* Remove direct authentication via trusted networks and API password
* Fix tests
2019-10-14 14:56:45 -07:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
6b0180f753
Fix demo ( #23087 )
...
* Fix demo
* Fix types
* Fix all the things
* Fix type
* Fix test
* Lint
2019-04-14 16:59:06 -07:00
Paulus Schoutsen
d1a621601d
No more opt-out auth ( #18854 )
...
* No more opt-out auth
* Fix var
2018-12-02 16:32:53 +01:00
Paulus Schoutsen
d014517ce2
Always set hass_user ( #18844 )
2018-11-30 17:32:47 +01:00
Paulus Schoutsen
c2f8dfcb9f
Legacy api fix ( #18733 )
...
* Set user for API password requests
* Fix tests
* Fix typing
2018-11-27 10:41:44 +01:00
Paulus Schoutsen
8b8629a5f4
Add permission checks to Rest API ( #18639 )
...
* Add permission checks to Rest API
* Clean up unnecessary method
* Remove all the tuple stuff from entity check
* Simplify perms
* Correct param name for owner permission
* Hass.io make/update user to be admin
* Types
2018-11-25 18:04:48 +01:00
Paulus Schoutsen
1341ecd2eb
Use proper signals ( #18613 )
...
* Emulated Hue not use deprecated handler
* Remove no longer needed workaround
* Add middleware directly
* Dont always load the ban config file
* Update homeassistant/components/http/ban.py
Co-Authored-By: balloob <paulus@home-assistant.io>
* Update __init__.py
2018-11-21 20:55:21 +01:00
Paulus Schoutsen
36c31a6293
Add permissions check in service helper ( #18596 )
...
* Add permissions check in service helper
* Lint
* Fix tests
* Lint
* Typing
* Fix unused impoert
2018-11-21 12:26:08 +01:00
Paulus Schoutsen
2e6346ca43
Break up websocket 2 ( #17028 )
...
* Break up websocket 2
* Lint+Test
* Lintttt
* Rename
2018-10-01 16:09:31 +02:00