Skip to content

Commit

Permalink
Bump mozart-api to 4.1.1.116.0 (#128573)
Browse files Browse the repository at this point in the history
Bump API
Fix testing
  • Loading branch information
mj23000 authored Oct 18, 2024
1 parent 1a9c6de commit 9037421
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/bang_olufsen/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"documentation": "https://www.home-assistant.io/integrations/bang_olufsen",
"integration_type": "device",
"iot_class": "local_push",
"requirements": ["mozart-api==3.4.1.8.8"],
"requirements": ["mozart-api==4.1.1.116.0"],
"zeroconf": ["_bangolufsen._tcp.local."]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ motionblindsble==0.1.2
motioneye-client==0.3.14

# homeassistant.components.bang_olufsen
mozart-api==3.4.1.8.8
mozart-api==4.1.1.116.0

# homeassistant.components.mullvad
mullvad-api==1.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ motionblindsble==0.1.2
motioneye-client==0.3.14

# homeassistant.components.bang_olufsen
mozart-api==3.4.1.8.8
mozart-api==4.1.1.116.0

# homeassistant.components.mullvad
mullvad-api==1.0.0
Expand Down
29 changes: 24 additions & 5 deletions tests/components/bang_olufsen/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from mozart_api.models import (
Action,
BeolinkPeer,
BeolinkSelf,
ContentItem,
ListeningMode,
ListeningModeFeatures,
Expand Down Expand Up @@ -35,6 +36,8 @@
TEST_FRIENDLY_NAME,
TEST_FRIENDLY_NAME_2,
TEST_FRIENDLY_NAME_3,
TEST_HOST_2,
TEST_HOST_3,
TEST_JID_1,
TEST_JID_2,
TEST_JID_3,
Expand Down Expand Up @@ -100,7 +103,7 @@ def mock_mozart_client() -> Generator[AsyncMock]:

# REST API client methods
client.get_beolink_self = AsyncMock()
client.get_beolink_self.return_value = BeolinkPeer(
client.get_beolink_self.return_value = BeolinkSelf(
friendly_name=TEST_FRIENDLY_NAME, jid=TEST_JID_1
)
client.get_softwareupdate_status = AsyncMock()
Expand Down Expand Up @@ -261,13 +264,29 @@ def mock_mozart_client() -> Generator[AsyncMock]:
}
client.get_beolink_peers = AsyncMock()
client.get_beolink_peers.return_value = [
BeolinkPeer(friendly_name=TEST_FRIENDLY_NAME_2, jid=TEST_JID_2),
BeolinkPeer(friendly_name=TEST_FRIENDLY_NAME_3, jid=TEST_JID_3),
BeolinkPeer(
friendly_name=TEST_FRIENDLY_NAME_2,
jid=TEST_JID_2,
ip_address=TEST_HOST_2,
),
BeolinkPeer(
friendly_name=TEST_FRIENDLY_NAME_3,
jid=TEST_JID_3,
ip_address=TEST_HOST_3,
),
]
client.get_beolink_listeners = AsyncMock()
client.get_beolink_listeners.return_value = [
BeolinkPeer(friendly_name=TEST_FRIENDLY_NAME_2, jid=TEST_JID_2),
BeolinkPeer(friendly_name=TEST_FRIENDLY_NAME_3, jid=TEST_JID_3),
BeolinkPeer(
friendly_name=TEST_FRIENDLY_NAME_2,
jid=TEST_JID_2,
ip_address=TEST_HOST_2,
),
BeolinkPeer(
friendly_name=TEST_FRIENDLY_NAME_3,
jid=TEST_JID_3,
ip_address=TEST_HOST_3,
),
]

client.get_listening_mode_set = AsyncMock()
Expand Down
3 changes: 3 additions & 0 deletions tests/components/bang_olufsen/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@
TEST_FRIENDLY_NAME_2 = "Laundry room Balance"
TEST_JID_2 = f"{TEST_TYPE_NUMBER}.{TEST_ITEM_NUMBER}[email protected]"
TEST_MEDIA_PLAYER_ENTITY_ID_2 = "media_player.beosound_balance_22222222"
TEST_HOST_2 = "192.168.0.2"

TEST_FRIENDLY_NAME_3 = "Lego room Balance"
TEST_JID_3 = f"{TEST_TYPE_NUMBER}.{TEST_ITEM_NUMBER}[email protected]"
TEST_MEDIA_PLAYER_ENTITY_ID_3 = "media_player.beosound_balance_33333333"
TEST_HOST_3 = "192.168.0.3"

TEST_FRIENDLY_NAME_4 = "Lounge room Balance"
TEST_JID_4 = f"{TEST_TYPE_NUMBER}.{TEST_ITEM_NUMBER}[email protected]"
TEST_MEDIA_PLAYER_ENTITY_ID_4 = "media_player.beosound_balance_44444444"
TEST_HOST_4 = "192.168.0.4"

TEST_HOSTNAME_ZEROCONF = TEST_NAME.replace(" ", "-") + ".local."
TEST_TYPE_ZEROCONF = "_bangolufsen._tcp.local."
Expand Down

0 comments on commit 9037421

Please sign in to comment.