76 Commits

Author SHA1 Message Date
Max Michels e856271a5a Replace duplicate constants in motioneye with homeassistant.const imports (#171954)
Co-authored-by: Erwin Douna <e.douna@gmail.com>
2026-05-23 12:05:02 +02:00
Franck Nijhof 0c44e77ae4 Remove advanced mode dependency from motioneye options flow (#170492)
Co-authored-by: Ariel Ebersberger <ariel@ebersberger.io>
2026-05-13 18:19:32 +02:00
epenet 88525955ce Remove import annotations from tests (#169527) 2026-04-30 09:30:46 +02:00
Manu 83ace00e14 Rename add-on to app in motionEye discovery flow (#161707) 2026-01-27 21:48:38 +01:00
G Johansson 00c4b09773 Use OptionsFlowWithReload in motioneye (#149130) 2025-07-21 08:15:51 +02:00
Marc Mueller 5e377b89fc Update pytest-asyncio to 1.0.0 (#145988)
* Update pytest-asyncio to 1.0.0

* Remove event_loop fixture uses
2025-06-02 06:12:22 +02:00
Josef Zweck bf69d4e0a8 Add search to media_player (#140321)
* Add search to media_player

* rename attr

* Add searchable property

* add pagination parameters

* Add suggested changes

* Apply suggestions

* Fix cast tests

* Fix first set of components

* update snapshot

* More tests

* more test fixes

* Rename attr

* first own test

* Add to google test

* Add service test

* Rename search query arg

* Add required feature to search service

* remove kwarg

* Update homeassistant/components/media_player/__init__.py

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>

* fix hue test

---------

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2025-04-16 23:09:16 +02:00
epenet d0a188b86d Standardize homeassistant imports in component tests (m-z) (#136807) 2025-01-29 08:57:57 +01:00
epenet 02956f9a83 Improve formatting in component test files (#135267)
Improve formatting in test files
2025-01-10 10:53:45 +01:00
Robert Resch 380974eed4 Remove hassio from ALLOWED_USED_COMPONENTS and move some functions to helper (#127228)
* Remove hassio from ALLOWED_USED_COMPONENTS

* Move HassioServiceInfo to helpers.service_info

* Deprecate moved functions

* Add note about deprecation

* Fix tests

* Implement suggestion

* Typo

* Update pyproject.toml

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-30 12:43:41 +01:00
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
epenet 0e7297873c Add SOURCE_HASSIO to DISCOVERY_SOURCES (#128454) 2024-10-16 13:34:28 +02:00
epenet f41494b7cc Ensure config_flow abort reasons have translations (#128140)
* Ensure config_flow abort reasons have translations

* Ignore fake_integration in application_credentials

* Mark gardena_bluetooth as needs fixing

* Mark google as needs fixing

* Mark google_assistant_sdk as needs fixing

* Mark homewizard as needs fixing

* Mark homeworks as needs fixing

* Mark honeywell as needs fixing

* Mark jewish_calendar as needs fixing

* Mark lg_netcast as needs fixing

* Mark lifx as needs fixing

* Mark lyric as needs fixing

* Mark madvr as needs fixing

* Mark matter as needs fixing

* Mark melcloud as needs fixing

* Mark motioneye as needs fixing

* Mark ollama as needs fixing

* Mark philips_js as needs fixing

* Mark spotify as needs fixing

* Mark srp_energy as needs fixing

* Mark subaru as needs fixing

* Mark tplink as needs fixing

* Mark yolink as needs fixing

* Mark youtube as needs fixing

* Fix incorrect comment
2024-10-14 16:39:10 +02:00
J. Nick Koston 31200040da Bump aiohttp to 3.10.6rc2 (#126468) 2024-09-24 08:51:08 +02:00
epenet 1858c64e5f Move motioneye base entity to separate module (#126495) 2024-09-23 12:48:07 +02:00
epenet 57a73d1b1b Use start_reauth helper method in integration tests (m-o) (#124790) 2024-08-28 16:19:31 +02:00
Erik Montnemery 9bbeb5d608 Add primary_config_entry attribute to device registry entries (#119959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
Paulus Schoutsen eb89ce47ea Inline primary integration (#119860) 2024-06-18 08:08:08 +02:00
epenet 3e9d25f81d Add missing argument type hints to component tests (#119671) 2024-06-14 09:26:46 +02:00
Sid 721b2c2ca8 Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
epenet a59621bf9e Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +02:00
Joost Lekkerkerker b9281327c4 Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +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
Marc Mueller aa16a9d707 Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +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
Jan-Philipp Benecke 9326ea09a5 Update m* tests to use entity & device registry fixtures (#103980) 2023-11-15 10:33:11 +01:00
Erik Montnemery e0af9de877 Use freezegun in motioneye tests (#99038) 2023-08-25 09:00:11 -05:00
Erik Montnemery 0b69f37d57 Adjust motioneye tests which create devices (#98201) 2023-08-10 18:23:51 +02:00
Erik Montnemery 7539cf25be Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Franck Nijhof 3e85a29b86 Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Erik Montnemery 63f3767a29 Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
epenet ef6798e854 Add caplog to known fixtures in pylint plugin (#87617) 2023-02-07 11:34:02 +01:00
epenet a79be493e5 Adjust hass_client type hint in integration tests (#86954)
* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
2023-02-02 16:29:57 -05:00
Franck Nijhof e50a531cd9 Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
Franck Nijhof bcf32f8331 Mark required fields in FlowResult typedict (#84811)
* Mark required fields in FlowResult typedict

* Remove unneeded asserts from tests
2022-12-30 12:01:45 +01:00
Joakim Plate 5c43f0861f Avoid running final writes in executor in test (#84679) 2022-12-28 23:40:11 +01:00
Joakim Plate c576a68d33 Upgrade pytest-aiohttp (#82475)
* Upgrade pytest-aiohttp

* Make sure executors, tasks and timers are closed

Some test will trigger warnings on garbage collect, these warnings
spills over into next test.

Some test trigger tasks that raise errors on shutdown, these spill
over into next test.

This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.

Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309

* Replace loop with event_loop

* Make sure time is frozen for tests

* Make sure the ConditionType is not async

  /home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    def wrapper(*args, **kwargs):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

* Increase litejet press tests with a factor 10

The times are simulated anyway, and we can't stop the normal
event from occuring.

* Use async handlers for aiohttp

tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
  /Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
    warnings.warn(

* Switch to freezegun in modbus tests

The tests allowed clock to tick in between steps

* Make sure skybell object are fully mocked

Old tests would trigger attempts to post to could services:

```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```

* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
Martin Hjelmare 62c4cd3c26 Add name and slug to supervisor discovery info (#80094) 2022-10-11 16:56:45 +02:00
Steven Looman 083db97476 Sort motioneye media items in media browser (#79408)
* Sort media

* KEY_MEDIA_SORT_ATTR should be in const

* Changes after review
2022-10-02 00:36:03 +02:00
epenet beca4bb7a5 Adjust root-import in motioneye tests (#78770) 2022-09-19 15:42:19 +02:00
Franck Nijhof 7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Franck Nijhof 68ccb96089 Refactor CI (#74014) 2022-07-07 18:53:24 +02:00
epenet a6db25219d Use Mapping for async_step_reauth in motioneye (#72769) 2022-06-01 06:58:29 +02:00
Erik Montnemery 47d0cc9b09 Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
epenet 4eb46d45ca Cleanup deprecated async_get_registry in tests (#72059) 2022-05-18 13:12:38 +02:00
Paulus Schoutsen d68ada74cc Restore children media class (#67409) 2022-03-01 15:14:14 -08:00
Paulus Schoutsen 2a8dc38d2d Move media_source to after_deps (#67195) 2022-02-24 14:54:46 -08:00
Paulus Schoutsen 459e6c273b Track hidden items in media source (#67096) 2022-02-23 09:51:01 +01:00