mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
WIP Fix pylint and PEP257 issues (tests) (#4120)
* Fix pylint and PEP257 issues * More PEP257 fixes
This commit is contained in:
committed by
Paulus Schoutsen
parent
443553ff16
commit
51e20c92f9
@@ -1,5 +1,6 @@
|
||||
"""The tests for the sun automation."""
|
||||
from datetime import datetime
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -12,10 +13,11 @@ import homeassistant.util.dt as dt_util
|
||||
from tests.common import fire_time_changed, get_test_home_assistant
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
class TestAutomationSun(unittest.TestCase):
|
||||
"""Test the sun automation."""
|
||||
|
||||
def setUp(self): # pylint: disable=invalid-name
|
||||
def setUp(self):
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.hass.config.components.append('group')
|
||||
@@ -25,11 +27,12 @@ class TestAutomationSun(unittest.TestCase):
|
||||
|
||||
@callback
|
||||
def record_call(service):
|
||||
"""Call recorder."""
|
||||
self.calls.append(service)
|
||||
|
||||
self.hass.services.register('test', 'automation', record_call)
|
||||
|
||||
def tearDown(self): # pylint: disable=invalid-name
|
||||
def tearDown(self):
|
||||
"""Stop everything that was started."""
|
||||
self.hass.stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user