From 04a98f99b78b143216d493394908844fa5ce4843 Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Sat, 25 Apr 2015 01:43:03 -0400 Subject: [PATCH] Updated entity tests to work with new attribute overwritting logic. --- tests/test_helper_entity.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_helper_entity.py b/tests/test_helper_entity.py index a36365afc3b..e418b26e4b6 100644 --- a/tests/test_helper_entity.py +++ b/tests/test_helper_entity.py @@ -25,7 +25,8 @@ class TestHelpersEntity(unittest.TestCase): def tearDown(self): # pylint: disable=invalid-name """ Stop down stuff we started. """ self.hass.stop() - entity.Entity.overwrite_hidden(self.entity.entity_id, None) + entity.Entity.overwrite_attribute(self.entity.entity_id, + ATTR_HIDDEN, None) def test_default_hidden_not_in_attributes(self): """ Test that the default hidden property is set to False. """ @@ -43,7 +44,8 @@ class TestHelpersEntity(unittest.TestCase): def test_overwriting_hidden_property_to_true(self): """ Test we can overwrite hidden property to True. """ - entity.Entity.overwrite_hidden(self.entity.entity_id, True) + entity.Entity.overwrite_attribute(self.entity.entity_id, + ATTR_HIDDEN, True) self.entity.update_ha_state() state = self.hass.states.get(self.entity.entity_id) @@ -51,7 +53,8 @@ class TestHelpersEntity(unittest.TestCase): def test_overwriting_hidden_property_to_false(self): """ Test we can overwrite hidden property to True. """ - entity.Entity.overwrite_hidden(self.entity.entity_id, False) + entity.Entity.overwrite_attribute(self.entity.entity_id, + ATTR_HIDDEN, False) self.entity.hidden = True self.entity.update_ha_state()