Pytest tests (#17750)
* Convert core tests
* Convert component tests to use pytest assert
* Lint 🤷♂️
* Fix test
* Fix 3 typos in docs
This commit is contained in:
1 parent
4222f7562b
commit
08fe7c3ece
223 files changed
+6747
-7237
No files matched your search
@@ -30,15 +30,15 @@ class TestGraph(unittest.TestCase):
|
||||
}
|
||||
}
|
||||
|
||||
self.assertTrue(setup_component(self.hass, 'history_graph', config))
|
||||
self.assertEqual(
|
||||
dict(self.hass.states.get('history_graph.name_1').attributes),
|
||||
{
|
||||
'entity_id': ['test.test'],
|
||||
'friendly_name': 'name_1',
|
||||
'hours_to_show': 24,
|
||||
'refresh': 0
|
||||
})
|
||||
assert setup_component(self.hass, 'history_graph', config)
|
||||
assert dict(
|
||||
self.hass.states.get('history_graph.name_1').attributes
|
||||
) == {
|
||||
'entity_id': ['test.test'],
|
||||
'friendly_name': 'name_1',
|
||||
'hours_to_show': 24,
|
||||
'refresh': 0
|
||||
}
|
||||
|
||||
def init_recorder(self):
|
||||
"""Initialize the recorder."""
|
||||
|
||||
Reference in new issue
Block a user