mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
pep257 fixes
This commit is contained in:
parent
c4b53039c1
commit
21fb18e5aa
@ -28,9 +28,7 @@ class TestTplink4DeviceScanner(unittest.TestCase):
|
|||||||
|
|
||||||
@requests_mock.mock()
|
@requests_mock.mock()
|
||||||
def test_get_mac_addresses_from_both_bands(self, m):
|
def test_get_mac_addresses_from_both_bands(self, m):
|
||||||
"""
|
"""Test grabbing the mac addresses from 2.4 and 5 GHz clients pages."""
|
||||||
Test grabbing the mac addresses from both 2.4 and 5 GHz clients pages.
|
|
||||||
"""
|
|
||||||
conf_dict = {
|
conf_dict = {
|
||||||
CONF_PLATFORM: 'tplink',
|
CONF_PLATFORM: 'tplink',
|
||||||
CONF_HOST: 'fake_host',
|
CONF_HOST: 'fake_host',
|
||||||
|
@ -29,9 +29,9 @@ ICON_URL = 'http://icons.wxug.com/i/c/k/clear.gif'
|
|||||||
|
|
||||||
def mocked_requests_get(*args, **kwargs):
|
def mocked_requests_get(*args, **kwargs):
|
||||||
"""Mock requests.get invocations."""
|
"""Mock requests.get invocations."""
|
||||||
|
|
||||||
class MockResponse:
|
class MockResponse:
|
||||||
"""Class to represent a mocked response."""
|
"""Class to represent a mocked response."""
|
||||||
|
|
||||||
def __init__(self, json_data, status_code):
|
def __init__(self, json_data, status_code):
|
||||||
"""Initialize the mock response class."""
|
"""Initialize the mock response class."""
|
||||||
self.json_data = json_data
|
self.json_data = json_data
|
||||||
@ -83,6 +83,7 @@ class TestWundergroundSetup(unittest.TestCase):
|
|||||||
DEVICES = []
|
DEVICES = []
|
||||||
|
|
||||||
def add_devices(self, devices):
|
def add_devices(self, devices):
|
||||||
|
"""Mock add devices."""
|
||||||
for device in devices:
|
for device in devices:
|
||||||
self.DEVICES.append(device)
|
self.DEVICES.append(device)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user