Upgrade linter (#4461)
This commit is contained in:
1 parent
37e28428c1
commit
d2bbc6ef70
21 files changed
+28
-7
No files matched your search
@@ -184,8 +184,10 @@ class TestApns(unittest.TestCase):
|
||||
|
||||
devices_path = hass.config.path('test_app_apns.yaml')
|
||||
with open(devices_path, 'w+') as out:
|
||||
out.write('1234: {name: test device 1, tracking_device_id: tracking123}\n') # nopep8
|
||||
out.write('5678: {name: test device 2, tracking_device_id: tracking456}\n') # nopep8
|
||||
out.write('1234: {name: test device 1, '
|
||||
'tracking_device_id: tracking123}\n')
|
||||
out.write('5678: {name: test device 2, '
|
||||
'tracking_device_id: tracking456}\n')
|
||||
|
||||
notify.setup(hass, config)
|
||||
self.assertTrue(hass.services.call('apns',
|
||||
@@ -293,8 +295,10 @@ class TestApns(unittest.TestCase):
|
||||
|
||||
devices_path = hass.config.path('test_app_apns.yaml')
|
||||
with open(devices_path, 'w+') as out:
|
||||
out.write('1234: {name: test device 1, tracking_device_id: tracking123}\n') # nopep8
|
||||
out.write('5678: {name: test device 2, tracking_device_id: tracking456}\n') # nopep8
|
||||
out.write('1234: {name: test device 1, '
|
||||
'tracking_device_id: tracking123}\n')
|
||||
out.write('5678: {name: test device 2, '
|
||||
'tracking_device_id: tracking456}\n')
|
||||
|
||||
notify_service = ApnsNotificationService(
|
||||
hass,
|
||||
|
||||
@@ -29,6 +29,7 @@ def test_real(func):
|
||||
|
||||
return guard_func
|
||||
|
||||
|
||||
# Guard a few functions that would make network connections
|
||||
location.detect_location_info = test_real(location.detect_location_info)
|
||||
location.elevation = test_real(location.elevation)
|
||||
|
||||
@@ -341,7 +341,7 @@ def test_template_complex():
|
||||
1, 'Hello',
|
||||
'{{ beer }}',
|
||||
'{% if 1 == 1 %}Hello{% else %}World{% endif %}',
|
||||
{'test': 1, 'test': '{{ beer }}'},
|
||||
{'test': 1, 'test2': '{{ beer }}'},
|
||||
['{{ beer }}', 1]
|
||||
):
|
||||
schema(value)
|
||||
|
||||
@@ -36,4 +36,5 @@ class MockScanner(object):
|
||||
"""
|
||||
return None if device == 'DEV1' else device.lower()
|
||||
|
||||
|
||||
SCANNER = MockScanner()
|
||||
Reference in new issue
Block a user