Skip to content

Commit

Permalink
Forgot we dont need to worry about older py
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnusKnutas committed Nov 7, 2018
1 parent fb9d0ef commit 78e32dd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/components/device_tracker/test_asuswrt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""The tests for the ASUSWRT device tracker platform."""
import asyncio

from homeassistant.setup import async_setup_component

from homeassistant.components.asuswrt import (
Expand All @@ -22,29 +20,27 @@
}}


@asyncio.coroutine
def test_password_or_pub_key_required(hass):
async def test_password_or_pub_key_required(hass):
"""Test creating an AsusWRT scanner without a pass or pubkey."""
with MockDependency('aioasuswrt.asuswrt')as mocked_asus:
mocked_asus.AsusWrt().connection.async_connect = mock_coro_func()
mocked_asus.AsusWrt().is_connected = False
result = yield from async_setup_component(
result = await async_setup_component(
hass, DOMAIN, {DOMAIN: {
CONF_HOST: 'fake_host',
CONF_USERNAME: 'fake_user'
}})
assert not result


@asyncio.coroutine
def test_get_scanner_with_password_no_pubkey(hass):
async def test_get_scanner_with_password_no_pubkey(hass):
"""Test creating an AsusWRT scanner with a password and no pubkey."""
with MockDependency('aioasuswrt.asuswrt')as mocked_asus:
mocked_asus.AsusWrt().connection.async_connect = mock_coro_func()
mocked_asus.AsusWrt(
).connection.async_get_connected_devices = mock_coro_func(
return_value={})
result = yield from async_setup_component(
result = await async_setup_component(
hass, DOMAIN, {DOMAIN: {
CONF_HOST: 'fake_host',
CONF_USERNAME: 'fake_user',
Expand Down

0 comments on commit 78e32dd

Please sign in to comment.