Fix formatting pylint comments in test (#15450)

This commit is contained in:
Paulus Schoutsen authored and Fabian Affolter committed 2018-07-13 23:02:23 +02:00
1 parent 1007bb83aa
commit 538236de8f
12 files changed
+32 -64

No files matched your search

@@ -168,8 +168,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
scanner.last_results = WAKE_DEVICES
self.assertEqual(list(WAKE_DEVICES), scanner.scan_devices())
def test_password_or_pub_key_required(self): \
# pylint: disable=invalid-name
def test_password_or_pub_key_required(self):
"""Test creating an AsusWRT scanner without a pass or pubkey."""
with assert_setup_component(0, DOMAIN):
assert setup_component(
@@ -183,8 +182,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
@mock.patch(
'homeassistant.components.device_tracker.asuswrt.AsusWrtDeviceScanner',
return_value=mock.MagicMock())
def test_get_scanner_with_password_no_pubkey(self, asuswrt_mock): \
# pylint: disable=invalid-name
def test_get_scanner_with_password_no_pubkey(self, asuswrt_mock):
"""Test creating an AsusWRT scanner with a password and no pubkey."""
conf_dict = {
DOMAIN: {
@@ -213,8 +211,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
@mock.patch(
'homeassistant.components.device_tracker.asuswrt.AsusWrtDeviceScanner',
return_value=mock.MagicMock())
def test_get_scanner_with_pubkey_no_password(self, asuswrt_mock): \
# pylint: disable=invalid-name
def test_get_scanner_with_pubkey_no_password(self, asuswrt_mock):
"""Test creating an AsusWRT scanner with a pubkey and no password."""
conf_dict = {
device_tracker.DOMAIN: {
@@ -292,8 +289,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
password='fake_pass', port=22)
)
def test_ssh_login_without_password_or_pubkey(self): \
# pylint: disable=invalid-name
def test_ssh_login_without_password_or_pubkey(self):
"""Test that login is not called without password or pub_key."""
ssh = mock.MagicMock()
ssh_mock = mock.patch('pexpect.pxssh.pxssh', return_value=ssh)
@@ -363,8 +359,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
mock.call(b'#')
)
def test_telnet_login_without_password(self): \
# pylint: disable=invalid-name
def test_telnet_login_without_password(self):
"""Test that login is not called without password or pub_key."""
telnet = mock.MagicMock()
telnet_mock = mock.patch('telnetlib.Telnet', return_value=telnet)
+1 -2
View File
@@ -31,8 +31,7 @@ class TestComponentsDeviceTrackerMQTT(unittest.TestCase):
except FileNotFoundError:
pass
def test_ensure_device_tracker_platform_validation(self): \
# pylint: disable=invalid-name
def test_ensure_device_tracker_platform_validation(self):
"""Test if platform validation was done."""
@asyncio.coroutine
def mock_setup_scanner(hass, config, see, discovery_info=None):
@@ -41,8 +41,7 @@ class TestComponentsDeviceTrackerJSONMQTT(unittest.TestCase):
except FileNotFoundError:
pass
def test_ensure_device_tracker_platform_validation(self): \
# pylint: disable=invalid-name
def test_ensure_device_tracker_platform_validation(self):
"""Test if platform validation was done."""
@asyncio.coroutine
def mock_setup_scanner(hass, config, see, discovery_info=None):
@@ -45,8 +45,7 @@ class TestComponentsDeviceTrackerUnifiDirect(unittest.TestCase):
@mock.patch(scanner_path,
return_value=mock.MagicMock())
def test_get_scanner(self, unifi_mock): \
# pylint: disable=invalid-name
def test_get_scanner(self, unifi_mock):
"""Test creating an Unifi direct scanner with a password."""
conf_dict = {
DOMAIN: {