There was an error while loading. Please reload this page.
1 parent c4e31ec commit 1662817Copy full SHA for 1662817
1 file changed
tests/core/test_attachment_storage.py
@@ -45,10 +45,12 @@ def test_get_attachment_metadata_returns_none_for_unknown_id(self):
45
"""Test that get_attachment_metadata returns None for unknown file_id."""
46
from core.attachment_storage import AttachmentStorage
47
48
- storage = AttachmentStorage()
49
- metadata = storage.get_attachment_metadata("nonexistent-uuid")
+ with tempfile.TemporaryDirectory() as tmpdir:
+ with patch("core.attachment_storage.STORAGE_DIR", Path(tmpdir)):
50
+ storage = AttachmentStorage()
51
+ metadata = storage.get_attachment_metadata("nonexistent-uuid")
52
- assert metadata is None
53
+ assert metadata is None
54
55
def test_get_attachment_path_returns_path_for_valid_id(self):
56
"""Test that get_attachment_path returns correct path."""
0 commit comments