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
@@ -51,7 +51,7 @@ class TestMochadSwitchSetup(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
}
|
||||
self.assertTrue(setup_component(self.hass, switch.DOMAIN, good_config))
|
||||
assert setup_component(self.hass, switch.DOMAIN, good_config)
|
||||
|
||||
|
||||
class TestMochadSwitch(unittest.TestCase):
|
||||
@@ -71,7 +71,7 @@ class TestMochadSwitch(unittest.TestCase):
|
||||
|
||||
def test_name(self):
|
||||
"""Test the name."""
|
||||
self.assertEqual('fake_switch', self.switch.name)
|
||||
assert 'fake_switch' == self.switch.name
|
||||
|
||||
def test_turn_on(self):
|
||||
"""Test turn_on."""
|
||||
|
||||
Reference in new issue
Block a user