Commit graph

43 commits

Author SHA1 Message Date
epenet
c7e065c413
Move enable_custom_integrations fixture to decorator () 2024-06-05 09:20:08 +02:00
epenet
a59621bf9e
Add more type hints to pylint plugin () 2024-05-28 18:37:38 +02:00
Sid
d5f883fbf0
Unignore Ruff PLR in tests ()
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
Marc Mueller
efc54971d3
Update empty line formatting after module docstring () 2024-03-23 00:27:57 +01:00
Jan-Philipp Benecke
b8e1862746
Remove deprecated hass.components from image_processing platform ()
* Remove deprecated `hass.components` from image_processing platform

* Add test and change log

* D'oh.. use updated error text
2024-03-17 15:59:29 +01:00
Marc Mueller
c88b337600
Add empty line after module docstring [tests f-k] () 2024-03-08 14:50:04 +01:00
Marc Mueller
887e48c440
Replace deprecated aiohttp_unused_port fixture () 2023-08-02 20:30:13 +02:00
Erik Montnemery
0126cfa9d9
Allow exposing any entity to the default conversation agent ()
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 09:45:54 -04:00
epenet
84f58543ef
Fix lingering timers in image processing tests () 2023-04-05 14:09:15 +02:00
epenet
1e352b60df
Add type hints to integration tests (part 11) () 2023-02-13 14:22:49 +01:00
epenet
37a2040d7b
Add type hints to integration tests (h-i) () 2023-02-08 18:12:56 +01:00
Franck Nijhof
e50a531cd9
Code styling tweaks to the tests - Part 2 ()
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
Franck Nijhof
566c0f63bd
Removes OpenALPR Local integration () 2023-01-17 10:43:14 +01:00
Joakim Plate
c576a68d33
Upgrade pytest-aiohttp ()
* 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
epenet
00dd27ef1b
Apply hass-relative-import to tests (i-r) () 2022-09-19 09:46:59 +02:00
Erik Montnemery
f6682ba99d
Block tests from opening sockets () 2021-10-05 14:46:09 -10:00
Erik Montnemery
ac053388b4
Convert image_processing tests to pytest ()
* Convert image_processing tests to pytest

* Use existing fixtures and test helpers

* Remove useless code
2021-09-22 15:00:28 +02:00
Joakim Sørensen
2f10f59717
Block custom integrations with missing or invalid version () 2021-05-17 15:48:41 +02:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Paulus Schoutsen
acbffb511d
Fix base_url extract stack ()
* Fix base_url extract stack

* Fix tests
2020-06-01 11:44:45 -07:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ()
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Martin Hjelmare
20aa089243
Clean up camera and demo camera ()
* Clean up demo camera

* Complete test_motion_detection

* Clean up image reading

* Clean up camera integration async methods

* Fix and clean camera integration tests

* Fix image processing patch
2020-04-12 14:56:19 +02:00
Franck Nijhof
906385172a
String formatting improvements for tests () 2020-04-05 00:26:08 +02:00
Paulus Schoutsen
5fdc60e067
Add Safe Mode ()
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Bas Nijholt
14779ce3d0 Sort imports according to PEP8 for components starting with "I" () 2019-12-09 14:21:24 +01:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
1ddc249989
Consolidate more platforms ()
* Consolidate final platforms

* Fix some tests

* Fix more tests

* Fix more tests
2019-03-23 20:22:35 -07:00
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests ()
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
cdce8p
e2a56721d3 Remove service helper (3) ()
* Update duckdns

* Update google_assistant

* Update group

* Update homematic

* Update image_processing

* Update input_boolean

* Update input_number

* Update input_select

* Update input_text
2018-09-26 08:50:05 +02:00
Ville Skyttä
dbd0763f83 Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
Ville Skyttä
2f7b79764a More pylint 2 fixes ()
## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-20 11:45:20 +03:00
Otto Winter
8dcfd35b8b Spelling fixes ()
* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
2018-01-29 23:37:19 +01:00
Ville Skyttä
55ee8959ba Spelling fixes () 2018-01-27 11:58:27 -08:00
Michael Prokop
08b0629eca Fix a bunch of typos ()
s/Addres /Address /
s/Chnage/Change/
s/Converion/Conversion/
s/Supressing/Suppressing/
s/agains /against /
s/allready/already/
s/analagous/analogous/
s/aquired/acquired/
s/arbitray/arbitrary/
s/argment/argument/
s/aroung/around/
s/attibute/attribute/
s/auxillary/auxiliary/
s/befor /before /
s/commmand/command/
s/conatin/contain/
s/conection/connection/
s/coresponding/corresponding/
s/entites/entities/
s/enviroment/environment/
s/everyhing/everything/
s/expected expected/expected/
s/explicity/explicitly/
s/formated/formatted/
s/incomming/incoming/
s/informations/information/
s/inital/initial/
s/inteface/interface/
s/interupt/interrupt/
s/mimick/mimic/
s/mulitple/multiple/
s/multible/multiple/
s/occured/occurred/
s/occuring/occurring/
s/overrided/overridden/
s/overriden/overridden/
s/platfrom/platform/
s/positon/position/
s/progess/progress/
s/recieved/received/
s/reciever/receiver/
s/recieving/receiving/
s/reponse/response/
s/representaion/representation/
s/resgister/register/
s/retrive/retrieve/
s/reuqests/requests/
s/segements/segments/
s/seperated/separated/
s/sheduled/scheduled/
s/succesfully/successfully/
s/suppport/support/
s/targetting/targeting/
s/thats/that's/
s/the the/the/
s/unkown/unknown/
s/verison/version/
s/while loggin out/while logging out/
2017-09-23 17:15:46 +02:00
Paulus Schoutsen
2650c73a89 Split bootstrap into bs + setup ()
* Split bootstrap into bs + setup

* Lint
2017-03-05 10:41:54 +01:00
Pascal Vizeli
881d53339b [Image_Processing][Breaking Change] Cleanup Base face class add support for microsoft face detect ()
* [Image_Processing] Cleanup Base face class add support for microsoft face detect

* fix lint

* add unittest for micosoft detect

* fix test
2017-02-08 09:19:40 -08:00
Pascal Vizeli
261ffbbfea Move part of image_processing tests ()
* Move part of image_processing tests

* fix lint
2017-01-29 14:40:37 -08:00
Pascal Vizeli
b57f5728c5 [image_processing/microsoft_face_identify] face recognition for automation ()
* [image_processing/microsoft_face_verify] face recognition for automation

* Add platform for microsoft face identify

* add unittest for demo

* Add unittest for platform
2017-01-24 21:50:10 -08:00
Adam Mills
df361dc1e1
Fix network tests to use get_test_instance_port 2017-01-21 22:15:05 -05:00
Pascal Vizeli
c2492d1493 Component "Image processing" ()
* Init new component for image processing.

* Add demo platform

* address comments

* add unittest v1 for demo

* Add unittest for alpr

* Add openalpr local test

* Add openalpr cloud platform

* Add unittest openalpr cloud platform

* Update stale docstring

* Address paulus comments

* Update stale docstring

* Add coro to function

* Add coro to cloud
2017-01-14 08:18:03 +01:00