* make port mapping optional * dependencies + improvements * Added bytes and packets sensors from IGD * flake8 check * new sensor with upnp counters * checks * whitespaces in blank line * requirements update * added sensor.upnp to .coveragerc * downgrade miniupnpc Latest version of miniupnpc is 2.0, but pypi only has 1.9 Fortunately it is enough * revert to non async miniupnpc will do network calls, so this component can’t be moved to coroutine * hof hof forgot to remove import ot asyncio * Add baudrate option * merge * Added Mediaroom media_player component * Updated header Works with MEO and VDF set-top boxes in Portugal * formatting * Development Checklist (done) * fix formatting according to houndci-bot * more format fixing (tks houndci-bot) * more fixes * too much cleanup... * too much * pylint check * Initial commit Basic configuration testing * flake8 and lint
32 lines
1 KiB
Python
32 lines
1 KiB
Python
"""The tests for the mediaroom media_player."""
|
|
|
|
import unittest
|
|
|
|
from homeassistant.setup import setup_component
|
|
import homeassistant.components.media_player as media_player
|
|
from tests.common import (
|
|
assert_setup_component, get_test_home_assistant)
|
|
|
|
|
|
class TestMediaroom(unittest.TestCase):
|
|
"""Tests the Mediaroom Component."""
|
|
|
|
def setUp(self):
|
|
"""Initialize values for this test case class."""
|
|
self.hass = get_test_home_assistant()
|
|
|
|
def tearDown(self): # pylint: disable=invalid-name
|
|
"""Stop everything that we started."""
|
|
self.hass.stop()
|
|
|
|
def test_mediaroom_config(self):
|
|
"""Test set up the platform with basic configuration."""
|
|
config = {
|
|
media_player.DOMAIN: {
|
|
'platform': 'mediaroom',
|
|
'name': 'Living Room'
|
|
}
|
|
}
|
|
with assert_setup_component(1, media_player.DOMAIN) as result_config:
|
|
assert setup_component(self.hass, media_player.DOMAIN, config)
|
|
assert result_config[media_player.DOMAIN]
|