Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
HomeAssistant
Core
Commits
2675c6d4
Unverified
Commit
2675c6d4
authored
3 years ago
by
epenet
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use DhcpServiceInfo in axis (#60092)
Co-authored-by:
epenet
<
epenet@users.noreply.github.com
>
parent
7560f116
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/components/axis/test_config_flow.py
+26
-23
26 additions, 23 deletions
tests/components/axis/test_config_flow.py
with
26 additions
and
23 deletions
tests/components/axis/test_config_flow.py
+
26
−
23
View file @
2675c6d4
...
...
@@ -5,7 +5,7 @@ import pytest
import
respx
from
homeassistant
import
data_entry_flow
from
homeassistant.components
import
zeroconf
from
homeassistant.components
import
dhcp
,
zeroconf
from
homeassistant.components.axis
import
config_flow
from
homeassistant.components.axis.const
import
(
CONF_EVENTS
,
...
...
@@ -16,7 +16,6 @@ from homeassistant.components.axis.const import (
DEFAULT_VIDEO_SOURCE
,
DOMAIN
as
AXIS_DOMAIN
,
)
from
homeassistant.components.dhcp
import
HOSTNAME
,
IP_ADDRESS
,
MAC_ADDRESS
from
homeassistant.config_entries
import
(
SOURCE_DHCP
,
SOURCE_IGNORE
,
...
...
@@ -256,11 +255,11 @@ async def test_reauth_flow_update_configuration(hass):
[
(
SOURCE_DHCP
,
{
HOSTNAME
:
f
"
axis-
{
MAC
}
"
,
IP_ADDRESS
:
DEFAULT_HOST
,
MAC_ADDRESS
:
MAC
,
}
,
dhcp
.
DhcpServiceInfo
(
hostname
=
f
"
axis-
{
MAC
}
"
,
ip
=
DEFAULT_HOST
,
macaddress
=
MAC
,
)
,
),
(
SOURCE_SSDP
,
...
...
@@ -347,11 +346,11 @@ async def test_discovery_flow(hass, source: str, discovery_info: dict):
[
(
SOURCE_DHCP
,
{
HOSTNAME
:
f
"
axis-
{
MAC
}
"
,
IP_ADDRESS
:
DEFAULT_HOST
,
MAC_ADDRESS
:
MAC
,
}
,
dhcp
.
DhcpServiceInfo
(
hostname
=
f
"
axis-
{
MAC
}
"
,
ip
=
DEFAULT_HOST
,
macaddress
=
MAC
,
)
,
),
(
SOURCE_SSDP
,
...
...
@@ -393,11 +392,11 @@ async def test_discovered_device_already_configured(
[
(
SOURCE_DHCP
,
{
HOSTNAME
:
f
"
axis-
{
MAC
}
"
,
IP_ADDRESS
:
"
2.3.4.5
"
,
MAC_ADDRESS
:
MAC
,
}
,
dhcp
.
DhcpServiceInfo
(
hostname
=
f
"
axis-
{
MAC
}
"
,
ip
=
"
2.3.4.5
"
,
macaddress
=
MAC
,
)
,
80
,
),
(
...
...
@@ -463,11 +462,11 @@ async def test_discovery_flow_updated_configuration(
[
(
SOURCE_DHCP
,
{
HOSTNAME
:
""
,
IP_ADDRESS
:
""
,
MAC_ADDRESS
:
"
01234567890
"
,
}
,
dhcp
.
DhcpServiceInfo
(
hostname
=
""
,
ip
=
""
,
macaddress
=
"
01234567890
"
,
)
,
),
(
SOURCE_SSDP
,
...
...
@@ -505,7 +504,11 @@ async def test_discovery_flow_ignore_non_axis_device(
[
(
SOURCE_DHCP
,
{
HOSTNAME
:
f
"
axis-
{
MAC
}
"
,
IP_ADDRESS
:
"
169.254.3.4
"
,
MAC_ADDRESS
:
MAC
},
dhcp
.
DhcpServiceInfo
(
hostname
=
f
"
axis-
{
MAC
}
"
,
ip
=
"
169.254.3.4
"
,
macaddress
=
MAC
,
),
),
(
SOURCE_SSDP
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment