Commit Graph
55 Commits
Author SHA1 Message Date
Joost LekkerkerkerandGitHub b9281327c4 Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost LekkerkerkerandGitHub 5d500cb74b Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00
Marc MuellerandGitHub aa16a9d707 Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc MuellerandGitHub 32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc MuellerandGitHub 1722e23df8 Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Jan-Philipp BeneckeandGitHub 9326ea09a5 Update m* tests to use entity & device registry fixtures (#103980) 2023-11-15 10:33:11 +01:00
Erik MontnemeryandGitHub e0af9de877 Use freezegun in motioneye tests (#99038) 2023-08-25 09:00:11 -05:00
Erik MontnemeryandGitHub 0b69f37d57 Adjust motioneye tests which create devices (#98201) 2023-08-10 18:23:51 +02:00
Erik MontnemeryandGitHub 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 NijhofandGitHub 3e85a29b86 Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Erik MontnemeryandGitHub 63f3767a29 Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
epenetandGitHub ef6798e854 Add caplog to known fixtures in pylint plugin (#87617) 2023-02-07 11:34:02 +01:00
epenetandGitHub 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
e50a531cd9 Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <[email protected]>
2023-01-26 01:23:53 +01:00
Franck NijhofandGitHub 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 PlateandGitHub 5c43f0861f Avoid running final writes in executor in test (#84679) 2022-12-28 23:40:11 +01:00
Joakim PlateandGitHub 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 HjelmareandGitHub 62c4cd3c26 Add name and slug to supervisor discovery info (#80094) 2022-10-11 16:56:45 +02:00
Steven LoomanandGitHub 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
epenetandGitHub beca4bb7a5 Adjust root-import in motioneye tests (#78770) 2022-09-19 15:42:19 +02:00
Franck NijhofandGitHub 7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Franck NijhofandGitHub 68ccb96089 Refactor CI (#74014) 2022-07-07 18:53:24 +02:00
epenetandGitHub a6db25219d Use Mapping for async_step_reauth in motioneye (#72769) 2022-06-01 06:58:29 +02:00
Erik MontnemeryandGitHub 47d0cc9b09 Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
epenetandGitHub 4eb46d45ca Cleanup deprecated async_get_registry in tests (#72059) 2022-05-18 13:12:38 +02:00
Paulus SchoutsenandGitHub d68ada74cc Restore children media class (#67409) 2022-03-01 15:14:14 -08:00
Paulus SchoutsenandGitHub 2a8dc38d2d Move media_source to after_deps (#67195) 2022-02-24 14:54:46 -08:00
Paulus SchoutsenandGitHub 459e6c273b Track hidden items in media source (#67096) 2022-02-23 09:51:01 +01:00
65ea54927d Fix MotionEye config flow (#64360)
Co-authored-by: Paulus Schoutsen <[email protected]>
Co-authored-by: Paulus Schoutsen <[email protected]>
2022-02-01 09:05:50 -08:00
Ville SkyttäandGitHub 5bf67cac66 Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
358922db56 Use dataclass for HassioServiceInfo (#60824)
Co-authored-by: epenet <[email protected]>
2021-12-03 14:05:56 +01:00
epenetandGitHub ade228ebc6 Use HassioServiceInfo in motioneye tests (#60861) 2021-12-02 10:09:26 -10:00
Franck NijhofandGitHub 6b9c2d8295 Add shorthand attribute support to Camera platform (#59837) 2021-11-25 16:03:53 +01:00
5fc51130ea Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 4 (#58669)
Co-authored-by: J. Nick Koston <[email protected]>
2021-11-15 09:18:57 -08:00
Dermot DuffyandGitHub 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 DuffyandGitHub 4746ff3798 Address late review of motionEye services (#58924) 2021-11-02 13:33:08 +01:00
Dermot DuffyandGitHub ab7d8db481 Add motionEye media browser (#53436) 2021-10-31 10:59:31 -05:00
Dermot DuffyandGitHub bbbbcfbb93 Add motionEye services (#53411) 2021-10-30 08:48:01 -05:00
Dermot DuffyandGitHub 944a7c09c4 Add motionEye sensor platform (#53415) 2021-10-29 16:14:26 -05:00
Dermot DuffyandGitHub a2102deb64 Support reverse proxying of motionEye streams (#53440) 2021-10-29 15:24:30 -05:00
Ville SkyttäandGitHub 77120a5137 Use http.HTTPStatus in components/m* (#58251) 2021-10-22 23:54:36 +02:00
Robert HillisandGitHub 488a636aec Clean up unused loggers (#57662) 2021-10-14 10:03:38 -07:00
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 <[email protected]>
2021-10-07 12:58:00 +02:00
Erik MontnemeryandGitHub f6682ba99d Block tests from opening sockets (#55516) 2021-10-05 14:46:09 -10:00
Erik MontnemeryandGitHub 099428fa73 Use hass_client_no_auth test fixture in additional tests (#57037) 2021-10-04 13:37:05 +02:00
75726a2695 Don't block motionEye setup on NoURLAvailableError (#54225)
Co-authored-by: Paulus Schoutsen <[email protected]>
2021-08-07 21:29:52 -07:00
Dermot DuffyandGitHub ffa7962a37 Fix motionEye switch refresh bug (#53413) 2021-07-24 12:12:27 +02:00
Dermot DuffyandGitHub dee5d8903c Add motionEye switches (#52491) 2021-07-22 23:17:39 -07:00
Dermot DuffyandGitHub 2868fef7d4 Add motion detection support to motionEye (#49665) 2021-07-01 11:22:43 +02:00