core/tests/components/media_player
ehendrix23 ecca51b16b Add tests for directv platform (#18590)
* Create test for platform

Created test for platform.
Added media_stop to common.py test

* Multiple improvements

Fixed lint issue in common.py
Fixed lint issues in test_directv.py
Improved patching import using modile_patcher.start() and stop()
Added asserts for service calls.

* Updates based on Martin's review

Updates based on Martin's review.

* Updated test based on PR#18474

Updated test to use service play_media instead of select_source based on change from PR18474

* Lint issues

Lint issues

* Further updates based on feedback

Updates based on feedback provided.

* Using async_load_platform for discovery test

Using async_load_platform for discovery tests.
Added asserts to ensure entities are created with correct names.

* Used HASS event_loop to setup component

Use HASS event_loop to setup the component async.

* Updated to use state machine for # entities

Updated to use state machine to count # entities instead of entities.

* Use hass.loop instead of getting current loop

Small update to use hass.loop instead, thanks Martin!

* Forgot to remove asyncio

Removed asyncio import.

* Added fixtures

Added fixtures.

* Remove not needed updates and assertions

* Return mocked dtv instance from side_effect

* Fix return correct fixture instance

* Clean up assertions

* Fix remaining patches

* Mock time when setting up component in fixture

* Patch time correctly

* Attribute _last_update should return utcnow
2018-12-01 10:28:27 +01:00
..
__init__.py Fix PEP257 issues 2016-03-09 10:25:50 +01:00
common.py Add tests for directv platform (#18590) 2018-12-01 10:28:27 +01:00
test_async_helpers.py Pytest tests (#17750) 2018-10-24 12:10:05 +02:00
test_blackbird.py Pytest tests (#17750) 2018-10-24 12:10:05 +02:00
test_cast.py Rework chromecast fix (#16804) 2018-09-23 23:35:07 +02:00
test_demo.py RFC: Call services directly (#18720) 2018-11-30 21:28:35 +01:00
test_directv.py Add tests for directv platform (#18590) 2018-12-01 10:28:27 +01:00
test_init.py Break up websocket component (#17003) 2018-10-01 11:21:00 +02:00
test_monoprice.py RFC: Call services directly (#18720) 2018-11-30 21:28:35 +01:00
test_samsungtv.py Revert changes that broke UI (#18495) 2018-11-20 13:29:05 +01:00
test_sonos.py Pytest tests (#17750) 2018-10-24 12:10:05 +02:00
test_soundtouch.py Pytest tests (#17750) 2018-10-24 12:10:05 +02:00
test_universal.py Pytest tests (#17750) 2018-10-24 12:10:05 +02:00
test_webostv.py Fix webostv select source (#11227) 2017-12-22 18:38:00 +01:00
test_yamaha.py Pytest tests (#17750) 2018-10-24 12:10:05 +02:00