Commit Graph

290 Commits (57b17472d73b6bb57ed4b595ee22c98c999c37fc)

Author SHA1 Message Date
Marc Mueller 24c50e0988
Fix aiodns DeprecationWarning in tests (#135921) 2025-01-18 08:04:01 -10:00
Joost Lekkerkerker 8a35261fd8
Remove unused noqas (#135583) 2025-01-15 10:02:18 +01:00
Joost Lekkerkerker 8db63adc11
Bump ruff to 0.9.1 (#135197) 2025-01-14 11:46:12 +01:00
Jan Bouwhuis b93aa760c5
Refactor the MQTT option and reconfigure flow (#133342)
* Move entry options to entry.options en remove broker setup from mqtt option flow

* UPdate diagnostics to export both entry data and options

* Parameterize entry options directly not depending on migration

* Update tests to use v2 entry and add separate migration test

* use start_reconfigure_flow helper

* Update quality scale comment

* Do minor entry upgrade, and do not force to upgrade entry

* Ensure options are read from older entries

* Add comment

* Follow up on code review

* Assert config entry version checking the broker connection

* Update comment
2025-01-13 19:00:18 +01:00
epenet 5df7092f41
Improve formatting in core files (#135256)
* Adjust core files formatting

* Adjust translations script
2025-01-10 09:08:37 +01:00
J. Nick Koston 89c73f56b1
Migrate to using aiohttp-asyncmdnsresolver for aiohttp resolver (#134830) 2025-01-06 12:06:28 -10:00
epenet 899fb091fc
Simplify access to hass in service calls (#133062) 2024-12-13 09:31:21 +01:00
epenet d6f4a79b46
Remove workaround for flaky translation tests (#131628) 2024-11-27 08:37:36 -06:00
Sid 9e98e446a2
Bump ruff to 0.8.0 (#131273) 2024-11-22 16:53:26 +01:00
epenet ef767c2b9f
Improve tests for frame helper (#130046)
* Improve tests for frame helper

* Improve comments

* Add ids

* Apply suggestions from code review
2024-11-07 17:35:58 +01:00
epenet 91157c21ef
Reapply "Fix unused snapshots not triggering failure in CI" (#129311) 2024-11-04 18:59:27 +01:00
Franck Nijhof 35b7c3038a
Revert "Fix unused snapshots not triggering failure in CI" (#129223)
Revert "Fix unused snapshots not triggering failure in CI (#128162)"

This reverts commit e888a95bd1.
2024-10-26 16:12:47 +02:00
epenet e888a95bd1
Fix unused snapshots not triggering failure in CI (#128162) 2024-10-26 07:15:51 +02:00
Erik Montnemery f1e8675756
Set autouse flag on session scope bluetooth fixture (#126589) 2024-09-24 08:43:32 +02:00
epenet 02cb6a6af7
Force root import of references from other components (#125816)
* Force root import of references from other components

* Improve

* Adjust

* Tweak exceptions

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Another

* Adjust

* More

* Ignore violations in test

* Improve
2024-09-16 11:28:42 +02:00
Erik Montnemery 2a1df2063d
Separate recorder test fixtures disabling context id migration (#125324)
* Separate recorder test fixtures disabling context id migration

* Fix test
2024-09-09 08:16:30 +02:00
Erik Montnemery ce2ffde22e
Update sensor recorder tests to async (#124061) 2024-08-18 13:20:58 -05:00
J. Nick Koston b15ea58851
Relocate code to get scheduled TimerHandles (#123546) 2024-08-12 09:15:33 +02:00
Erik Montnemery 6840f27bc6
Verify respx mock routes are cleaned up when tests finish (#122852) 2024-07-30 17:12:58 +02:00
Erik Montnemery ea75c8864f
Remove support for live schema migration of old recorder databases (#122399)
* Remove support for live schema migration of old recorder databases

* Update test
2024-07-29 15:52:18 +02:00
Erik Montnemery 5dbd7684ce
Fail tests if recorder creates nested sessions (#122579)
* Fail tests if recorder creates nested sessions

* Adjust import order

* Move get_instance
2024-07-25 21:18:55 +02:00
Erik Montnemery 6223fe93c8
Fix typo in conftest.py (#122583) 2024-07-25 12:08:52 +02:00
Erik Montnemery 20fc5233a1
Add recorder data migrator class to clean up states table (#122069) 2024-07-22 13:04:01 -05:00
Erik Montnemery 2f47312eeb
Fix recorder setup hanging if non live schema migration fails (#122242) 2024-07-20 13:10:23 +02:00
Erik Montnemery 436a38c1d2
Revert "Fix recorder setup hanging if non live schema migration fails" (#122232) 2024-07-20 12:29:08 +02:00
Erik Montnemery 153b69c971
Fix recorder setup hanging if non live schema migration fails (#122207) 2024-07-20 11:17:40 +02:00
Marc Mueller a6068dcdf2
Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
Erik Montnemery 6921e053e4
Move recorder data migration implementation to migrators (#122045) 2024-07-17 10:59:58 +02:00
Erik Montnemery 9970b7eece
Refactor recorder data migration (#121009)
* Refactor recorder data migration

* Fix stale docstrings

* Don't store a session object in BaseRunTimeMigration instances

* Simplify logic in EntityIDMigration.migration_done

* Fix tests
2024-07-16 21:50:19 +02:00
J. Nick Koston 19d2d023ab
Ensure states table rebuild still happens if the event_id index was removed (#121938)
* Ensure states table rebuild still happens if the event_id index was removed

If ix_states_event_id was removed by the foreign key still
exists, the states table would not get rebuilt. This should
not happen under normal circumstances and seems to only be
possible if the index was removed manually or Home
Assistant was restarted forcefully in the middle
of a previous migration from years ago.

* cover

* fix tests

* mysql wont allow at that point but thats ok as long as its gone at the end
2024-07-14 23:20:52 +02:00
Erik Montnemery d55d02623a
Add recorder test fixture to enable persistent SQLite database (#121137)
* Add recorder test fixture to enable persistent SQLite database

* Fix tests directly using async_test_home_assistant context manager
2024-07-04 09:59:37 +02:00
Erik Montnemery 5029da6919
Make the async_setup_recorder_instance fixture a context manager (#121086) 2024-07-03 14:05:34 -05:00
Erik Montnemery 87f7703f3c
Use async_setup_recorder_instance fixture in recorder migration tests (#121050) 2024-07-03 08:56:05 -05:00
epenet 61b2e4ca32
Add Context to service_calls fixture (#120923) 2024-07-01 14:05:30 +02:00
Marc Mueller ca55986057
Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
Joost Lekkerkerker b56c4a757c
Bump ruff to 0.5.0 (#120749) 2024-06-28 15:23:21 +02:00
Erik Montnemery 4a86693254
Verify default timezone is restored when test ends (#116216) 2024-06-26 09:41:16 +02:00
Erik Montnemery e32a27a8ff
Remove hass_recorder test fixture (#120295) 2024-06-24 11:14:08 +02:00
Jan Bouwhuis f1fd52bc30
Fix issue in mqtt fixture calling disconnect handler (#120246) 2024-06-23 10:37:08 -05:00
Robert Resch bae008b0e2
Remove legacy_api_password auth provider (#119976) 2024-06-19 22:46:30 +02:00
epenet 9f41133bbc
Add missing argument type to core tests (#119667) 2024-06-14 08:42:01 +02:00
J. Nick Koston d52ce03aa4
Ensure asyncio blocking checks are undone after tests run (#119542)
* Ensure asyncio blocking checks are undone after tests run

* no reason to ever enable twice

* we are patching objects, make it more generic

* make sure bootstrap unblocks as well

* move disable to tests only

* re-protect

* Update tests/test_block_async_io.py

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

* Revert "Update tests/test_block_async_io.py"

This reverts commit 2d46028e21.

* tweak name

* fixture only

* Update tests/conftest.py

* Update tests/conftest.py

* Apply suggestions from code review

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-13 08:52:01 +02:00
epenet 9e8f9abbf7
Ignore misplaced-bare-raise warnings in tests (#119403) 2024-06-11 17:59:54 +02:00
epenet fce4fc663e
Fix import-outside-toplevel pylint warnings in core tests (#119394) 2024-06-11 16:10:34 +02:00
epenet 572700a326
Ignore c-extension-no-member pylint warnings in tests (#119378) 2024-06-11 12:57:43 +02:00
epenet 8cbfc5a58b
Use service_calls fixture in arcam_fmj tests (#119274) 2024-06-10 13:09:51 +02:00
epenet 5166426d0a
Add type hints for service_calls fixture in pylint plugin (#118356) 2024-06-08 16:32:27 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
J. Nick Koston 67b3be8432
Remove useless threading locks in mqtt (#118737) 2024-06-04 14:21:03 -05:00
epenet 37fc16d7b6
Fix incorrect `patch` type hint in main conftest (#118461) 2024-06-02 15:34:30 +02:00