Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subentries_data to config entry data if dev #4445

Merged
merged 5 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--requirement requirements_base.txt
asynctest==0.13.0
freezegun==1.5.1
josepy<2
pytest==8.3.4
pytest-asyncio==0.25.3
pytest-cov==6.0.0
Expand Down
1 change: 1 addition & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ def create_config_entry(
# legacy workaround for tests
if AwesomeVersion(HA_VERSION).dev:
config_entry_data["discovery_keys"] = {}
config_entry_data["subentries_data"] = None
return MockConfigEntry(**config_entry_data)


Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ def _entity_state(entity: er.RegistryEntry) -> dict[str, Any]:
),
**(additional or {}),
},
("categories", "config_entry_id", "device_id", "labels"),
("categories", "config_entry_id",
"device_id", "labels", "config_subentry_id"),
),
),
filename,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def json(**kwargs):

snapshots.assert_match(
safe_json_dumps(recursive_remove_key(
result, ("flow_id", "minor_version"))),
result, ("flow_id", "minor_version", "subentries"))),
"config_flow/test_full_user_flow_implementation.json",
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from tests.conftest import SnapshotFixture

REMOVE_KEYS = ("entry_id", "last_updated", "local", "minor_version",
"created_at", "modified_at", "discovery_keys")
"created_at", "modified_at", "discovery_keys", "subentries_data", "subentries")


async def test_diagnostics(hacs: HacsBase, snapshots: SnapshotFixture):
Expand Down
Loading