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:
parent
16a846b1e7
commit
4d4fd19f87
8 changed files with 103 additions and 87 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue