2023-11-26 16:38:47 +00:00
|
|
|
"""Tests for the OurGroceries integration."""
|
|
|
|
|
2024-07-19 12:45:42 +00:00
|
|
|
from typing import Any
|
2023-11-26 16:38:47 +00:00
|
|
|
|
2024-07-19 12:45:42 +00:00
|
|
|
|
|
|
|
def items_to_shopping_list(
|
|
|
|
items: list, version_id: str = "1"
|
|
|
|
) -> dict[str, dict[str, Any]]:
|
2023-11-26 16:38:47 +00:00
|
|
|
"""Convert a list of items into a shopping list."""
|
2023-12-20 09:35:42 +00:00
|
|
|
return {"list": {"versionId": version_id, "items": items}}
|