Commit Graph

66 Commits (f0f0b4b8fa2f1bb04385c9a076adb61d5cae32e4)

Author SHA1 Message Date
Erik Montnemery 3e62c6ae2f
Move core config functionality to its own module (#129065)
* Move core config functionality to its own module

* Adjust test
2024-10-24 13:34:51 +02:00
Michael 8236a9529f
Mark integrations as single_config_entry in manifest [k-r] (#128191)
* mark integrations as single_config_entry in manifest

* fix owntracks test
2024-10-12 09:03:17 +02:00
Alberto Montes 5d2f8319b1
Update string formatting to use f-string on tests (#125986)
* Update string formatting to use f-string on tests

* Update test_package.py

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

* Update statement given feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-19 10:32:38 +02:00
epenet b53ae884a6
Add missing hass type hint in component tests (o) (#124226) 2024-08-19 16:16:34 +02:00
epenet 3e5d0eb632
Improve type hints in owntracks tests (#123905) 2024-08-14 15:08:10 +02:00
epenet d4082aee5a
Improve type hints in owntracks tests (#123866) 2024-08-14 13:08:54 +02:00
Marc Mueller fcfb580f0c
Update pylint to 3.2.4 (#120606) 2024-06-26 22:29:55 +02:00
epenet 3e9d25f81d
Add missing argument type hints to component tests (#119671) 2024-06-14 09:26:46 +02:00
epenet a0abd537c6
Adjust nacl import in tests (#119392) 2024-06-11 18:06:30 +02:00
epenet 9be972b13e
Add type hints for list[Device] in test fixtures (#118681) 2024-06-03 10:21:24 +02:00
epenet 242ee04642
Improve type hints in tests (i-p) (#118380) 2024-05-30 08:47:08 +02:00
epenet 461ac1e0bc
Add ClientSessionGenerator type hints in tests (#118377) 2024-05-29 14:49:14 +02:00
Joost Lekkerkerker 5d500cb74b
Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston 4f18f0d902
Fix setup timings when config entry platform loads are not awaited (#113959)
* Move setup time logging into the context manager

We were fetching the time twice but since the context
manager already has the timing, move it there

* remove log setup assertions from integration test

* tweak logging to give us better data for tracking issues

* redundant

* adjust

* preen

* fixes

* adjust

* make api change internal so nobody uses it

* coverage

* fix test

* fix more tests

* coverage

* more tests assuming internal calls

* fix more

* adjust

* adjust

* fix axis tests

* fix broadlink -- it does not call async_forward_entry_setup

* missed some

* remove useless patch

* rename, detect it both ways

* clear

* debug

* try to fix

* handle phase finishing out while paused

* where its set does not need to know its late as that is an implemenation detail of setup

* where its set does not need to know its late as that is an implemenation detail of setup

* tweak

* simplify

* reduce complexity

* revert order change as it makes review harder

* revert naming changes as it makes review harder

* improve comment

* improve debug

* late dispatch test

* test the other way as well

* Update setup.py

* Update setup.py

* Update setup.py

* simplify

* reduce
2024-03-23 15:26:38 -04:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Sid d5fd005db8
Add ruff rule PIE808 (#113621) 2024-03-17 09:56:26 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Marc Mueller 544d6b05a5
Replace mock_coro with AsyncMock (#99014)
* Replace mock_coro with AsyncMock

* Remove mock_coro test helper function

* Remove redundant AsyncMock
2023-08-25 22:54:55 +02:00
Ville Skyttä 34b47a2597
Remove unnnecessary pylint configs from components [m-r]* (#98924) 2023-08-24 00:56:50 +02:00
epenet 88444b2e0c
Add type hints to integration tests (part 16) (#88008) 2023-02-15 10:50:02 +01:00
epenet 3abf7ea18a
Add type hints to integration tests (m-p) (#87705) 2023-02-08 07:48:54 -08:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof ef800335fb
Enable Ruff PT022 (#86792)
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
epenet 30bf0634fe
Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
Aarni Koskela e4c73259f7
Configure autoflake for pre-commit (#82414) 2022-11-22 08:10:36 +01:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Erik Montnemery 67838518ab
Abort owntracks config flow when not connected to home assistant cloud (#64968) 2022-01-26 11:07:34 -08:00
Erik Montnemery f92e8ab931
Drop owntracks import flow (#64967) 2022-01-26 15:47:37 +01:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Erik Montnemery acdddabe1f
Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
J. Nick Koston 3f3f77c6e6
Reduce config entry setup/unload boilerplate N-P (#49777) 2021-04-27 20:42:21 +02:00
Ville Skyttä 153d6e891e
Use config_entries.SOURCE_* constants (#49631) 2021-04-25 11:27:40 +02:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
springstan c7ebfdb403
Use single_instance_allowed for webhook config flows (#40965) 2020-10-01 20:44:13 +02:00
Ville Skyttä 6ae9399237
Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen 8ed1a29c82
Drop white blacklist pt1 (#37816) 2020-07-13 17:43:11 +02:00
Erik Montnemery 280f49540e
Drop use of async_mock_mqtt_component (#37011) 2020-06-22 23:59:50 +02:00
Franck Nijhof e56dd8ed50
Detect use of deprecated base_url (#35353)
* Detect use of deprecated base_url

* Update get_url helper

* Update core migration

* Migrate all tests
2020-05-08 17:52:32 +02:00
Franck Nijhof 2223592486
Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Paulus Schoutsen 0d700f6a63
Fix tests for Python 3.8 (#34672) 2020-04-25 14:32:55 -07:00
Franck Nijhof d7e9959442
String formatting improvements for tests (2) (#33666) 2020-04-05 00:33:07 +02:00
Paulus Schoutsen aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
Paulus Schoutsen 873bf887a5
Add OwnTracks Friends via person integration (#27303)
* Returns an unencrypted location of all persons with device trackers

* Handle encrypted messages and exclude the poster's location

* Friends is by default False. Reformats with Black

* Updates the context init to account for the Friends option

* Fix Linter error

* Remove  as a config option

* No longer imports encyrption-related functions in encrypt_message

* Fix initialization in test

* Test the friends functionality

* Bugfix for persons not having a location

* Better way to return the timestamp

* Update homeassistant/components/owntracks/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Linting and tid generation

* Fix test

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-05 12:55:48 -08:00
Ville Skyttä 5216477353
Be consistent with Home Assistant and Hass.io spelling (#30500)
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00