Fix PEP257 issues
This commit is contained in:
parent
d6eab03a61
commit
9838697d2b
120 changed files with 1447 additions and 1297 deletions
|
@ -1,9 +1,4 @@
|
|||
"""
|
||||
tests.components.automation.test_zone
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Tests location automation.
|
||||
"""
|
||||
"""The tests for the location automation."""
|
||||
import unittest
|
||||
|
||||
from homeassistant.components import automation, zone
|
||||
|
@ -12,9 +7,10 @@ from tests.common import get_test_home_assistant
|
|||
|
||||
|
||||
class TestAutomationZone(unittest.TestCase):
|
||||
""" Test the event automation. """
|
||||
"""Test the event automation."""
|
||||
|
||||
def setUp(self): # pylint: disable=invalid-name
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
zone.setup(self.hass, {
|
||||
'zone': {
|
||||
|
@ -33,10 +29,11 @@ class TestAutomationZone(unittest.TestCase):
|
|||
self.hass.services.register('test', 'automation', record_call)
|
||||
|
||||
def tearDown(self): # pylint: disable=invalid-name
|
||||
""" Stop down stuff we started. """
|
||||
"""Stop everything that was started."""
|
||||
self.hass.stop()
|
||||
|
||||
def test_if_fires_on_zone_enter(self):
|
||||
"""Test for firing on zone enter."""
|
||||
self.hass.states.set('test.entity', 'hello', {
|
||||
'latitude': 32.881011,
|
||||
'longitude': -117.234758
|
||||
|
@ -66,6 +63,7 @@ class TestAutomationZone(unittest.TestCase):
|
|||
self.assertEqual(1, len(self.calls))
|
||||
|
||||
def test_if_not_fires_for_enter_on_zone_leave(self):
|
||||
"""Test for not firing on zone leave."""
|
||||
self.hass.states.set('test.entity', 'hello', {
|
||||
'latitude': 32.880586,
|
||||
'longitude': -117.237564
|
||||
|
@ -95,6 +93,7 @@ class TestAutomationZone(unittest.TestCase):
|
|||
self.assertEqual(0, len(self.calls))
|
||||
|
||||
def test_if_fires_on_zone_leave(self):
|
||||
"""Test for firing on zone leave."""
|
||||
self.hass.states.set('test.entity', 'hello', {
|
||||
'latitude': 32.880586,
|
||||
'longitude': -117.237564
|
||||
|
@ -124,6 +123,7 @@ class TestAutomationZone(unittest.TestCase):
|
|||
self.assertEqual(1, len(self.calls))
|
||||
|
||||
def test_if_not_fires_for_leave_on_zone_enter(self):
|
||||
"""Test for not firing on zone enter."""
|
||||
self.hass.states.set('test.entity', 'hello', {
|
||||
'latitude': 32.881011,
|
||||
'longitude': -117.234758
|
||||
|
@ -153,6 +153,7 @@ class TestAutomationZone(unittest.TestCase):
|
|||
self.assertEqual(0, len(self.calls))
|
||||
|
||||
def test_zone_condition(self):
|
||||
"""Test for zone condition."""
|
||||
self.hass.states.set('test.entity', 'hello', {
|
||||
'latitude': 32.880586,
|
||||
'longitude': -117.237564
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue