Clean up core (#10305)

* Clean up core

* Lint

* Fix tests

* Address comment

* Update entity.py

* romve test for forward update to async_update

* fix lint
This commit is contained in:
Paulus Schoutsen 2017-11-03 06:19:36 -07:00 committed by Pascal Vizeli
parent 9b8c64c8b6
commit 4e8e04fe66
7 changed files with 52 additions and 102 deletions

View file

@ -100,22 +100,6 @@ class TestHelpersEntity(object):
fmt, 'overwrite hidden true',
hass=self.hass) == 'test.overwrite_hidden_true_2'
def test_update_calls_async_update_if_available(self):
"""Test async update getting called."""
async_update = []
class AsyncEntity(entity.Entity):
hass = self.hass
entity_id = 'sensor.test'
@asyncio.coroutine
def async_update(self):
async_update.append([1])
ent = AsyncEntity()
ent.update()
assert len(async_update) == 1
def test_device_class(self):
"""Test device class attribute."""
state = self.hass.states.get(self.entity.entity_id)