Skip to content

Commit

Permalink
fix: make sure default image location exists (#1059)
Browse files Browse the repository at this point in the history
* fix: make sure default image location exists

* fix test
  • Loading branch information
firstof9 authored Jan 28, 2025
1 parent 2b48d13 commit 5f15970
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ custom_components/mail_and_packages/.backup/__init__.py
custom_components/mail_and_packages/.backup/camera.py
custom_components/mail_and_packages/.backup/manifest.json
custom_components/mail_and_packages/.backup/sensor.py
custom_components/mail_and_packages/images/*
notes.txt

# Test files
Expand Down
1 change: 1 addition & 0 deletions custom_components/mail_and_packages/images/.PLACEHOLDER
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Placeholder to keep default images directory
14 changes: 9 additions & 5 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1925,11 +1925,15 @@ async def test_form_storage_error(
result = await hass.config_entries.flow.async_configure(
result["flow_id"], input_3
)
assert result["type"] == "form"
assert result["step_id"] == step_id_4
result = await hass.config_entries.flow.async_configure(
result["flow_id"], input_4
)
with patch(
"custom_components.mail_and_packages.config_flow.path.exists",
return_value=False,
):
assert result["type"] == "form"
assert result["step_id"] == step_id_4
result = await hass.config_entries.flow.async_configure(
result["flow_id"], input_4
)

assert result["type"] == "form"
assert result["step_id"] == step_id_4
Expand Down

0 comments on commit 5f15970

Please sign in to comment.