Commit Graph

53 Commits (6423501498cedc6a11bed9e9a07fde0d3426379b)

Author SHA1 Message Date
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
ZuluWhiskey 65ea54927d
Fix MotionEye config flow (#64360)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-02-01 09:05:50 -08:00
Ville Skyttä 5bf67cac66
Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
epenet 358922db56
Use dataclass for HassioServiceInfo (#60824)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 14:05:56 +01:00
epenet ade228ebc6
Use HassioServiceInfo in motioneye tests (#60861) 2021-12-02 10:09:26 -10:00
Franck Nijhof 6b9c2d8295
Add shorthand attribute support to Camera platform (#59837) 2021-11-25 16:03:53 +01:00
Simone Chemelli 5fc51130ea
Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 4 (#58669)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-11-15 09:18:57 -08:00
Dermot Duffy 8fda2e0a1d
Address late review of motionEye media browser (#58925)
* Media-content type fixes post-codereview.

* More f-string.

* Use the 'video' media class not 'movie'.
2021-11-03 06:37:52 +01:00
Dermot Duffy 4746ff3798
Address late review of motionEye services (#58924) 2021-11-02 13:33:08 +01:00
Dermot Duffy ab7d8db481
Add motionEye media browser (#53436) 2021-10-31 10:59:31 -05: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
Ville Skyttä 77120a5137
Use http.HTTPStatus in components/m* (#58251) 2021-10-22 23:54:36 +02:00
Robert Hillis 488a636aec
Clean up unused loggers (#57662) 2021-10-14 10:03:38 -07: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 f6682ba99d
Block tests from opening sockets (#55516) 2021-10-05 14:46:09 -10:00
Erik Montnemery 099428fa73
Use hass_client_no_auth test fixture in additional tests (#57037) 2021-10-04 13:37:05 +02:00
Dermot Duffy 75726a2695
Don't block motionEye setup on NoURLAvailableError (#54225)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-07 21:29:52 -07:00
Dermot Duffy ffa7962a37
Fix motionEye switch refresh bug (#53413) 2021-07-24 12:12:27 +02: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
Franck Nijhof 19c505c0f0
Add Supervisor discovery to motionEye (#50901)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 17:40:07 +02:00
Dermot Duffy 809c1394d4
Enable mypy for motionEye (aye aye!) (#49738) 2021-05-04 08:19:41 +02:00