mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Rename ha_test folder to tests
This commit is contained in:
parent
e0b424c88f
commit
d4cad0b267
@ -7,6 +7,6 @@ install:
|
|||||||
script:
|
script:
|
||||||
- flake8 homeassistant --exclude bower_components,external
|
- flake8 homeassistant --exclude bower_components,external
|
||||||
- pylint homeassistant
|
- pylint homeassistant
|
||||||
- coverage run --source=homeassistant -m unittest discover ha_test
|
- coverage run --source=homeassistant -m unittest discover tests
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
pylint homeassistant
|
pylint homeassistant
|
||||||
flake8 homeassistant --exclude bower_components,external
|
flake8 homeassistant --exclude bower_components,external
|
||||||
python3 -m unittest discover ha_test
|
python3 -m unittest discover tests
|
||||||
|
@ -7,7 +7,7 @@ Provides a mock switch platform.
|
|||||||
Call init before using it in your tests to ensure clean test data.
|
Call init before using it in your tests to ensure clean test data.
|
||||||
"""
|
"""
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF
|
from homeassistant.const import STATE_ON, STATE_OFF
|
||||||
from ha_test.helpers import MockToggleDevice
|
from tests.helpers import MockToggleDevice
|
||||||
|
|
||||||
|
|
||||||
DEVICES = []
|
DEVICES = []
|
@ -7,7 +7,7 @@ Provides a mock switch platform.
|
|||||||
Call init before using it in your tests to ensure clean test data.
|
Call init before using it in your tests to ensure clean test data.
|
||||||
"""
|
"""
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF
|
from homeassistant.const import STATE_ON, STATE_OFF
|
||||||
from ha_test.helpers import MockToggleDevice
|
from tests.helpers import MockToggleDevice
|
||||||
|
|
||||||
|
|
||||||
DEVICES = []
|
DEVICES = []
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.helper
|
tests.helper
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
Helper method for writing tests.
|
Helper method for writing tests.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_chromecast
|
tests.test_component_chromecast
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests Chromecast component.
|
Tests Chromecast component.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_core
|
tests.test_component_core
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests core compoments.
|
Tests core compoments.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_demo
|
tests.test_component_demo
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests demo component.
|
Tests demo component.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_group
|
tests.test_component_group
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests the group compoments.
|
Tests the group compoments.
|
||||||
@ -75,7 +75,7 @@ class TestComponentsDeviceTracker(unittest.TestCase):
|
|||||||
device_tracker.DOMAIN: {CONF_PLATFORM: 'test'}
|
device_tracker.DOMAIN: {CONF_PLATFORM: 'test'}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
def test_device_tracker(self):
|
def test_writing_known_devices_file(self):
|
||||||
""" Test the device tracker class. """
|
""" Test the device tracker class. """
|
||||||
scanner = loader.get_component(
|
scanner = loader.get_component(
|
||||||
'device_tracker.test').get_scanner(None, None)
|
'device_tracker.test').get_scanner(None, None)
|
||||||
@ -117,7 +117,6 @@ class TestComponentsDeviceTracker(unittest.TestCase):
|
|||||||
dev3 = device_tracker.ENTITY_ID_FORMAT.format('DEV3')
|
dev3 = device_tracker.ENTITY_ID_FORMAT.format('DEV3')
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
nowNext = now + timedelta(seconds=ha.TIMER_INTERVAL)
|
|
||||||
nowAlmostMinGone = (now + device_tracker.TIME_DEVICE_NOT_FOUND -
|
nowAlmostMinGone = (now + device_tracker.TIME_DEVICE_NOT_FOUND -
|
||||||
timedelta(seconds=1))
|
timedelta(seconds=1))
|
||||||
nowMinGone = nowAlmostMinGone + timedelta(seconds=2)
|
nowMinGone = nowAlmostMinGone + timedelta(seconds=2)
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_group
|
tests.test_component_group
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests the group compoments.
|
Tests the group compoments.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_http
|
tests.test_component_http
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests Home Assistant HTTP component does what it should do.
|
Tests Home Assistant HTTP component does what it should do.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_switch
|
tests.test_component_switch
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests switch component.
|
Tests switch component.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_sun
|
tests.test_component_sun
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests Sun component.
|
Tests Sun component.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_component_switch
|
tests.test_component_switch
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests switch component.
|
Tests switch component.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_core
|
tests.test_core
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Provides tests to verify that Home Assistant core works.
|
Provides tests to verify that Home Assistant core works.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_helpers
|
tests.test_helpers
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests component helpers.
|
Tests component helpers.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_ha_test.test_loader
|
ha_tests.test_loader
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Provides tests to verify that we can load components.
|
Provides tests to verify that we can load components.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.remote
|
tests.remote
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests Home Assistant remote methods and classes.
|
Tests Home Assistant remote methods and classes.
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
ha_test.test_util
|
tests.test_util
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Tests Home Assistant util methods.
|
Tests Home Assistant util methods.
|
Loading…
x
Reference in New Issue
Block a user