Fix PEP257 issues
This commit is contained in:
1 parent
d6eab03a61
commit
9838697d2b
120 files changed
+1447
-1297
No files matched your search
@@ -1,9 +1,4 @@
|
||||
"""
|
||||
tests.test_component_demo
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Tests demo component.
|
||||
"""
|
||||
"""The tests for the Demo component."""
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
@@ -17,14 +12,15 @@ from tests.common import mock_http_component, get_test_home_assistant
|
||||
|
||||
@patch('homeassistant.components.sun.setup')
|
||||
class TestDemo(unittest.TestCase):
|
||||
""" Test the demo module. """
|
||||
"""Test the Demo component."""
|
||||
|
||||
def setUp(self): # pylint: disable=invalid-name
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
mock_http_component(self.hass)
|
||||
|
||||
def tearDown(self): # pylint: disable=invalid-name
|
||||
""" Stop down stuff we started. """
|
||||
"""Stop everything that was started."""
|
||||
self.hass.stop()
|
||||
|
||||
try:
|
||||
@@ -33,19 +29,19 @@ class TestDemo(unittest.TestCase):
|
||||
pass
|
||||
|
||||
def test_if_demo_state_shows_by_default(self, mock_sun_setup):
|
||||
""" Test if demo state shows if we give no configuration. """
|
||||
"""Test if demo state shows if we give no configuration."""
|
||||
demo.setup(self.hass, {demo.DOMAIN: {}})
|
||||
|
||||
self.assertIsNotNone(self.hass.states.get('a.Demo_Mode'))
|
||||
|
||||
def test_hiding_demo_state(self, mock_sun_setup):
|
||||
""" Test if you can hide the demo card. """
|
||||
"""Test if you can hide the demo card."""
|
||||
demo.setup(self.hass, {demo.DOMAIN: {'hide_demo_state': 1}})
|
||||
|
||||
self.assertIsNone(self.hass.states.get('a.Demo_Mode'))
|
||||
|
||||
def test_all_entities_can_be_loaded_over_json(self, mock_sun_setup):
|
||||
""" Test if you can hide the demo card. """
|
||||
"""Test if you can hide the demo card."""
|
||||
demo.setup(self.hass, {demo.DOMAIN: {'hide_demo_state': 1}})
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user