Fix formatting of mac addresses from dhcp discovery mocking in onvif (#110589)

dhcp returns addresses in lowercase without :
pull/110592/head
J. Nick Koston 2024-02-14 13:55:14 -06:00 committed by GitHub
parent 52e8f7f865
commit a87960a323
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 10 deletions

View File

@ -26,7 +26,7 @@ HOST = "1.2.3.4"
PORT = 80
USERNAME = "admin"
PASSWORD = "12345"
MAC = "aa:bb:cc:dd:ee"
MAC = "aa:bb:cc:dd:ee:ff"
SERIAL_NUMBER = "ABCDEFGHIJK"
MANUFACTURER = "TestManufacturer"
MODEL = "TestModel"

View File

@ -23,7 +23,7 @@
'pref_disable_polling': False,
'source': 'user',
'title': 'Mock Title',
'unique_id': 'aa:bb:cc:dd:ee',
'unique_id': 'aa:bb:cc:dd:ee:ff',
'version': 1,
}),
'device': dict({
@ -35,7 +35,7 @@
}),
'info': dict({
'fw_version': 'TestFirmwareVersion',
'mac': 'aa:bb:cc:dd:ee',
'mac': 'aa:bb:cc:dd:ee:ff',
'manufacturer': 'TestManufacturer',
'model': 'TestModel',
'serial_number': 'ABCDEFGHIJK',

View File

@ -40,18 +40,14 @@ DISCOVERY = [
config_flow.CONF_NAME: "TestCamera2",
config_flow.CONF_HOST: "5.6.7.8",
config_flow.CONF_PORT: PORT,
"MAC": "ee:dd:cc:bb:aa",
"MAC": "ff:ee:dd:cc:bb:aa",
},
]
DHCP_DISCOVERY = dhcp.DhcpServiceInfo(
hostname="any",
ip="5.6.7.8",
macaddress=MAC,
hostname="any", ip="5.6.7.8", macaddress=MAC.lower().replace(":", "")
)
DHCP_DISCOVERY_SAME_IP = dhcp.DhcpServiceInfo(
hostname="any",
ip="1.2.3.4",
macaddress=MAC,
hostname="any", ip="1.2.3.4", macaddress=MAC.lower().replace(":", "")
)