Commit graph

32 commits

Author SHA1 Message Date
Marc Mueller
a6068dcdf2
Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
Franck Nijhof
a9bf12f102
Rename Services to Actions in translation strings (#121777) 2024-07-15 21:19:25 +02:00
epenet
c7e065c413
Move enable_custom_integrations fixture to decorator (#118844) 2024-06-05 09:20:08 +02:00
epenet
1317837986
Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
Sid
895f73d8e4
Enable Ruff A001 (#115654) 2024-04-21 23:25:27 +02:00
Jan Bouwhuis
67ab49b825
Fetch ServiceNotFound message from translation cache and fix super (#114084)
* Fetch ServiceNotFound message from translation cache and fix super

* Fix tests trace component

* Fix script errors
2024-03-24 07:41:13 -10:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
J. Nick Koston
c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Jan Bouwhuis
54cf7010cd
Add ServiceValidationError and translation support (#102592)
* Add ServiceValidationError

* Add translation support

* Extend translation support to HomeAssistantError

* Add translation support for ServiceNotFound exc

* Frontend translation & translation_key from caller

* Improve fallback message

* Set websocket_api as default translation_domain

* Add MQTT ServiceValidationError exception

* Follow up comments

* Revert removing gueard on translation_key

* Revert test changes to fix CI test

* Follow up comments

* Fix CI test

* Follow up

* Improve language

* Follow up comment
2023-11-06 15:45:04 +01:00
Erik Montnemery
6183a36fce
Replace assert_lists_same with pytest_unordered in integrations t-z (#94903) 2023-06-20 20:23:49 +02:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
epenet
9719f817c0
Bump ruff to 0.0.256 (#89734) 2023-03-15 10:07:12 +01:00
epenet
9a5f88f55f
Add type hints to integration tests (part 23) (#88235) 2023-02-17 16:40:46 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
219cee2ca9
Move Trace classes to separate module (#78433) 2022-09-14 09:23:29 -04:00
Paulus Schoutsen
b1a04302b5
Stringify enums in selectors (#71441) 2022-05-06 11:25:01 -07:00
Erik Montnemery
961ee717ef
Store automation and script traces (#56894)
* Store automation and script traces

* Pylint

* Deduplicate code

* Fix issues when no stored traces are available

* Store serialized data for restored traces

* Update WS API

* Update test

* Restore context

* Improve tests

* Add new test files

* Rename restore_traces to async_restore_traces

* Refactor trace.websocket_api

* Defer loading stored traces

* Lint

* Revert refactoring which is no longer needed

* Correct order when restoring traces

* Apply suggestion from code review

* Improve test coverage

* Apply suggestions from code review
2021-10-19 10:23:23 +02:00
Joakim Sørensen
2f10f59717
Block custom integrations with missing or invalid version (#49916) 2021-05-17 15:48:41 +02:00
Erik Montnemery
ce64690817
Make number of stored traces configurable (#49728) 2021-04-27 10:27:12 -07:00
Erik Montnemery
ff5fbea1fb
Improve trace of template conditions (#49101)
* Improve trace of template conditions

* Refactor

* Fix wait_template trace

* Update tests
2021-04-12 20:22:28 +02:00
Erik Montnemery
76d0f93ec1
Include blueprint input in automation trace (#48575) 2021-04-01 13:34:47 -07:00
Erik Montnemery
9f481e1642
Include script script_execution in script and automation traces (#48576) 2021-04-01 09:42:23 -07:00
Erik Montnemery
c06ac9e12b
Improve automation trace tests (#48542) 2021-03-31 10:51:29 -07:00
Erik Montnemery
e2f8bce0a0
Improve error handling for WS API trace/get (#48502) 2021-03-31 15:58:36 +02:00
Erik Montnemery
b26779a27a
Add id to automation triggers (#48464) 2021-03-31 14:56:04 +02:00
Erik Montnemery
7534b54e4e
Merge condition and action traces (#48461) 2021-03-29 14:06:49 -07:00
Erik Montnemery
0c6a1c29ec
Fix broken trace tests (#48458) 2021-03-29 10:06:22 +02:00
Erik Montnemery
14ef0531f0
Address review comments from trace refactoring PRs (#48288) 2021-03-29 08:09:14 +02:00
Erik Montnemery
c6a20d0fc1
Improve traces for nested script runs (#48366) 2021-03-26 10:14:01 -07:00
Erik Montnemery
8896ae0d56
Add support for tracing script execution (#48276)
* Add support for tracing script execution

* Tweak
2021-03-24 17:56:22 +01:00
Erik Montnemery
9f8b697e64
Refactor tracing: Prepare for tracing of scripts (#48231) 2021-03-23 14:53:38 -07:00
Erik Montnemery
a49989241a
Refactor tracing: Move trace support to its own integration (#48224) 2021-03-22 19:19:38 +01:00
Renamed from tests/components/automation/test_websocket_api.py (Browse further)