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:
Paulus Schoutsen authored and GitHub committed 2018-10-24 12:10:05 +02:00
1 parent 4222f7562b
commit 08fe7c3ece
223 files changed
+6747 -7237

No files matched your search

@@ -40,8 +40,7 @@ class TestTplink4DeviceScanner(unittest.TestCase):
# Mock the token retrieval process
FAKE_TOKEN = 'fake_token'
fake_auth_token_response = 'window.parent.location.href = ' \
'"https://a/{}/userRpm/Index.htm";'.format(
FAKE_TOKEN)
'"https://a/{}/userRpm/Index.htm";'.format(FAKE_TOKEN)
m.get('http://{}/userRpm/LoginRpm.htm?Save=Save'.format(
conf_dict[CONF_HOST]), text=fake_auth_token_response)
@@ -65,4 +64,4 @@ class TestTplink4DeviceScanner(unittest.TestCase):
expected_mac_results = [mac.replace('-', ':') for mac in
[FAKE_MAC_1, FAKE_MAC_2, FAKE_MAC_3]]
self.assertEqual(tplink.last_results, expected_mac_results)
assert tplink.last_results == expected_mac_results