Commit Graph

8 Commits (b07e9df308a2fec26d76ee0ae046c5699d0546d1)

Author SHA1 Message Date
epenet 50cbabb2d8
Add type hints to integration tests (part 15) (#88006) 2023-02-15 10:00:49 +01:00
Joakim Plate 8bd4125390
Test corrections noticed during pytest upgrade (#82579)
* Withing trigger a call to coordinator after init

* Stop discovery task on STOP event

* Stop dsmr connection task on STOP

* Use autospec in modem_serial tests

close on AioSerial is non async, and should not be mocked as a coroutine

* Make sure responder is specced correctly

tests/components/emulated_hue/test_init.py::test_setup_works
  /Users/joakim/src/hass/home-assistant/homeassistant/components/emulated_hue/__init__.py:119: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    protocol.close()

* Don't assume Pymodbus is the only thing logging

* Use gather instead of wait

```
homeassistant/components/homeassistant/__init__.py:208: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
```

* Increase wait time for automation tests

Assuming exit within 1 seconds is unreasonable on a potentially loaded
test machine.

* Avoid changing app state after startup
2022-11-23 20:53:28 +01:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Robert Hillis 7947866962
Refactor tests for modem_callerid (#59691)
* Refactor tests for modem_callerid

* uno mas

* uno mas

* uno mas
2022-02-21 10:08:19 -08:00
epenet 4ffb0b8380
Use UsbServiceInfo in modem_callerid (#60268)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-24 09:40:52 +01:00
Robert Hillis 68e80f1431
Remove yaml config from modem_callerid (#59526) 2021-11-13 14:14:49 +01:00
Martin Hjelmare 5aba8a7c81
Fix modem_callerid test warning (#57760) 2021-10-15 09:36:26 -07:00
Robert Hillis 14aa9c91eb
Add Config Flow to Modem Caller ID integration (#46677)
* Add phone_modem integration

* Use original domain

* Add init tests for Modem Caller ID

* Clean up tests

* Clean up tests

* apply suggestions

* Fix tests

* Make only one instance possible

* Allow more than 1 device and remove hangup service

* simplify already configured

* Update sensor.py

* Update config_flow.py

* Fix manifest

* More cleanup

* Fix tests

* Ue target

* Clean up sensor.py

* Minor tweaks

* Close modem on restart and unload

* Update requirements

* fix tests

* Bump phone_modem

* rework

* add typing

* use async_setup_platform

* typing

* tweak

* cleanup

* fix init

* preserve original name

* remove callback line

* use list of serial devices on host

* tweak

* rework

* Rework for usb dicsovery

* Update requirements_test_all.txt

* Update config_flow.py

* tweaks

* tweak

* move api out of try statement

* suggested tweaks

* clean up

* typing

* tweak

* tweak

* async name the service
2021-09-13 14:22:54 -10:00