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:
parent
9b8c64c8b6
commit
4e8e04fe66
7 changed files with 52 additions and 102 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue