Skip to content

Commit

Permalink
Fix formatting of mac addresses from dhcp discovery mocking in onvif (#…
Browse files Browse the repository at this point in the history
…110589)

dhcp returns addresses in lowercase without :
  • Loading branch information
bdraco authored Feb 14, 2024
1 parent 52e8f7f commit a87960a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/components/onvif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
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"
Expand Down
4 changes: 2 additions & 2 deletions tests/components/onvif/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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',
Expand Down
10 changes: 3 additions & 7 deletions tests/components/onvif/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,14 @@
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(":", "")
)


Expand Down

0 comments on commit a87960a

Please sign in to comment.