Replace pyunifi with aiounifi in UniFi device tracker (#24149)

* Replace pyunifi with aiounifi

* Fix tests

* Add sslcontext

* Fix tests

* Fix import order
This commit is contained in:
Robert Svensson 2019-06-02 18:24:13 +02:00 committed by GitHub
parent 16a846b1e7
commit 4d4fd19f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 103 additions and 87 deletions

View file

@ -146,7 +146,8 @@ async def test_flow_works(hass, aioclient_mock):
flow.hass = hass
with patch('aiounifi.Controller') as mock_controller:
def mock_constructor(host, username, password, port, site, websession):
def mock_constructor(
host, username, password, port, site, websession, sslcontext):
"""Fake the controller constructor."""
mock_controller.host = host
mock_controller.username = username
@ -254,7 +255,8 @@ async def test_user_permissions_low(hass, aioclient_mock):
flow.hass = hass
with patch('aiounifi.Controller') as mock_controller:
def mock_constructor(host, username, password, port, site, websession):
def mock_constructor(
host, username, password, port, site, websession, sslcontext):
"""Fake the controller constructor."""
mock_controller.host = host
mock_controller.username = username