26 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
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
epenet d0a188b86d Standardize homeassistant imports in component tests (m-z) (#136807) 2025-01-29 08:57:57 +01:00
J. Nick Koston 31200040da Bump aiohttp to 3.10.6rc2 (#126468) 2024-09-24 08:51:08 +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
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
Marc Mueller 32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +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 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
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
Franck Nijhof 68ccb96089 Refactor CI (#74014) 2022-07-07 18:53:24 +02:00
epenet 4eb46d45ca Cleanup deprecated async_get_registry in tests (#72059) 2022-05-18 13:12:38 +02:00
Franck Nijhof 6b9c2d8295 Add shorthand attribute support to Camera platform (#59837) 2021-11-25 16:03:53 +01:00
Dermot Duffy 4746ff3798 Address late review of motionEye services (#58924) 2021-11-02 13:33:08 +01:00
Dermot Duffy bbbbcfbb93 Add motionEye services (#53411) 2021-10-30 08:48:01 -05:00
Dermot Duffy 944a7c09c4 Add motionEye sensor platform (#53415) 2021-10-29 16:14:26 -05:00
Dermot Duffy a2102deb64 Support reverse proxying of motionEye streams (#53440) 2021-10-29 15:24:30 -05:00
Erik Montnemery f6682ba99d Block tests from opening sockets (#55516) 2021-10-05 14:46:09 -10:00
Dermot Duffy dee5d8903c Add motionEye switches (#52491) 2021-07-22 23:17:39 -07:00
Dermot Duffy 2868fef7d4 Add motion detection support to motionEye (#49665) 2021-07-01 11:22:43 +02:00
Dermot Duffy 809c1394d4 Enable mypy for motionEye (aye aye!) (#49738) 2021-05-04 08:19:41 +02:00
Dermot Duffy bbe58091a8 Create a motionEye integration (#48239) 2021-04-23 23:00:28 -07:00