Clean up tests (#4209)
This commit is contained in:
1 parent
6f68752d1e
commit
e88b98f5fa
11 files changed
+42
-5
No files matched your search
@@ -1,6 +1,7 @@
|
||||
"""The tests for the notify demo platform."""
|
||||
import unittest
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.bootstrap import setup_component
|
||||
import homeassistant.components.notify as notify
|
||||
from homeassistant.components.notify import demo
|
||||
@@ -23,6 +24,7 @@ class TestNotifyDemo(unittest.TestCase):
|
||||
self.events = []
|
||||
self.calls = []
|
||||
|
||||
@callback
|
||||
def record_event(event):
|
||||
"""Record event to send notification."""
|
||||
self.events.append(event)
|
||||
@@ -33,6 +35,7 @@ class TestNotifyDemo(unittest.TestCase):
|
||||
""""Stop down everything that was started."""
|
||||
self.hass.stop()
|
||||
|
||||
@callback
|
||||
def record_calls(self, *args):
|
||||
"""Helper for recording calls."""
|
||||
self.calls.append(args)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""The tests for the notify.group platform."""
|
||||
import unittest
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.bootstrap import setup_component
|
||||
import homeassistant.components.notify as notify
|
||||
from homeassistant.components.notify import group
|
||||
@@ -34,6 +35,7 @@ class TestNotifyGroup(unittest.TestCase):
|
||||
|
||||
assert self.service is not None
|
||||
|
||||
@callback
|
||||
def record_event(event):
|
||||
"""Record event to send notification."""
|
||||
self.events.append(event)
|
||||
|
||||
Reference in new issue
Block a user