Commit Graph

39 Commits (dae8c0fc3824fa9cb3275ad3d7ef1359cbd1802b)

Author SHA1 Message Date
Jan-Philipp Benecke 0972dc5867
Migrate directv test to use freezegun (#105894) 2023-12-18 14:40:13 +01:00
Jan-Philipp Benecke 81450f0117
Update d-e* tests to use entity & device registry fixtures (#103804) 2023-11-12 10:38:32 +01:00
epenet 728f62b1ec
Add type hints to integration tests (part 5) (#87850) 2023-02-12 19:39:48 +01:00
Franck Nijhof e4a78420b8
Enable Ruff PT013 (#86757)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-27 09:09:46 +01:00
epenet 30bf0634fe
Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
epenet 0ac581a0b1
Cleanup EntityFeature in tests (#78859) 2022-09-21 10:48:55 +02:00
epenet 41d2ac3943
Cleanup MediaClass and MediaType in tests (#78817)
Cleanup MediaClass/MediaType in tests
2022-09-20 17:55:13 +02:00
epenet a809e18559
Apply hass-relative-import to tests (d-h) (#78730) 2022-09-19 09:31:57 +02:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
Dave T f02e9eb70f
Use DeviceClass Enums in directv tests (#62118) 2021-12-16 23:34:07 +01:00
epenet f292691b7b
Use SsdpServiceInfo for ssdp tests (part 3) (#60334)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-25 11:46:20 -06:00
Erik Montnemery 49a27e12ad
Add support to entity registry for overriding device_class (#59985) 2021-11-22 08:38:06 -08:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Ville Skyttä 2730a27fd0
Use HTTPStatus instead of HTTP_* constants in various test mocks (#56543) 2021-10-01 15:52:45 -07:00
Ville Skyttä 19d25cd901
Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
jan iversen 6a4f414236
Change HomeAssistantType to HomeAssistant (#49522) 2021-04-21 15:53:06 -10:00
Franck Nijhof bb9da22a84
Clean up superfluous integration setup - part 3 (#48484) 2021-03-29 13:23:44 -10:00
Marc Mueller 54d1e9985f
Update typing 15 (#48079) 2021-03-18 15:13:22 +01:00
Erik Montnemery 87e7cebd36
Update tests c-h to use registry async_get (#47652) 2021-03-09 14:31:17 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Chris Talkington 0ba1298f1b
Remove YAML config for directv (#41961) 2020-10-29 09:51:22 +01:00
springstan 6a7caad8dc
Use content type json constant (#40312) 2020-09-23 20:21:55 +02:00
Chris Talkington f6a3eea7f2
Add device class to directv devices (#39628)
* add device class to directv devices

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update media_player.py
2020-09-03 23:27:13 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Chris Talkington 72b0f95719
Optimize directv config flow tests. (#38460) 2020-08-01 16:39:55 -10:00
Chris Talkington 813e60d31a
Mock setup in directv config flow tests (#37439)
* mock setup in directv config flow tests

* Update test_config_flow.py
2020-07-03 17:31:57 -05:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Chris Talkington 1f4cdda234
Support DirecTV music channels with extended meta (#34228) 2020-04-15 18:08:54 -07:00
springstan fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant (#33832) 2020-04-08 23:20:03 +02:00
Chris Talkington d54ee77375
Update directv remote platform tests service calls (#33793)
* Update test_remote.py

* Update test_remote.py
2020-04-07 11:57:51 -07:00
Chris Talkington 30fd9950e2
Add remote platform to directv (#32790)
* add remote platform to directv.

* Update __init__.py

* Update .coveragerc

* Rename remote py to remote.py

* Update remote.py

* squash.

* Update remote.py

* squash.

* Update remote.py
2020-04-02 10:18:53 -07:00
Chris Talkington b892dbc6ea
Refactor DirecTV Integration to Async (#33114)
* switch to directv==0.1.1

* work on directv async.

* Update const.py

* Update __init__.py

* Update media_player.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update media_player.py

* Update test_config_flow.py

* Update media_player.py

* Update media_player.py

* work on tests and coverage.

* Update __init__.py

* Update __init__.py

* squash.
2020-03-31 15:35:32 -07:00
Chris Talkington 5dd031af17
Optimize directv client initialization (#32706)
* Optimize directv client initialization.

* Update config_flow.py

* Update media_player.py

* Update media_player.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update test_media_player.py

* Update __init__.py

* Update media_player.py

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_media_player.py

* Update test_media_player.py

* Update __init__.py

* Update __init__.py

* Update __init__.py
2020-03-13 21:55:21 -07:00
Chris Talkington bb666b9ac6
Add config flow to directv (#32162)
* initial work on config flow.

* more work on config flow.

* work on config flow and add tests. other cleanup.

* cleanup tests.

* fix test.

* isort

* Update .coveragerc

* Update test_init.py

* Update test_init.py

* Update test_init.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* correct upnp serial format.

* improve config flow coverage.

* review tweaks.

* further review tweaks

* simplify dtv data gathering job

* lint

* black

* Update test_init.py

* Update test_init.py

* Simplify exception handling.

* Simplify exception handling.

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* fix failing test.

* restore change made during debug.

* isort.

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-11 12:28:38 -07:00
Chris Talkington 8dd80e0e3c
Add unique_id to directv entities (#31838)
* add unique_id to directv entities.

* add addiitional debug and fix tests.

* fix lint error.

* rework unique_id and flow a bit.

* review adjustments.

* review adjustments

* review adjustments

* review adjustments.

* review adjustments

* review adjustments

* review adjustments

* review adjustments

* lint

* use serial number for host unit and mac address for client units

* fix elsif

* update test with realistic client id

* lint
2020-02-23 19:26:34 +01:00
Bas Nijholt 08f128e9c7 Sort imports according to PEP8 for components starting with "D" (#29764)
* use isort to sort imports for components starting with 'd'

* fix isort mistake
2019-12-09 17:42:00 +01:00
Paulus Schoutsen dad11f8208 Fix tests & lint 2019-12-04 22:47:40 -08:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00