Skip to content
Open
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
7 changes: 6 additions & 1 deletion tests/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,12 @@ class FakeProc:
stdout = json.dumps(fake_payload)
stderr = ""

with patch("ghostbrain.connectors.calendar.macos.subprocess.run",
# Force the JXA fallback path: on dev machines with EventKit access
# granted, `_fetch_via_eventkit` would return real calendar data and
# bypass the subprocess mock entirely.
with patch("ghostbrain.connectors.calendar.macos._fetch_via_eventkit",
return_value=None), \
patch("ghostbrain.connectors.calendar.macos.subprocess.run",
return_value=FakeProc()):
events = connector.fetch(datetime(2026, 5, 9, tzinfo=timezone.utc))

Expand Down
8 changes: 5 additions & 3 deletions tests/test_weekly_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,11 @@ def test_render_emits_wikilinks_for_artifacts(vault: Path) -> None:
inp = build_weekly_input(week_end)
rendered = render_weekly_input_for_prompt(inp)

# Wikilink form should be aliased: [[path|alias]]
assert "[[20-contexts/sanlam/calendar/artifacts/decisions/" in rendered
assert "|defer-simi]]" in rendered or "defer-simi]" in rendered
# Wikilink form should be aliased: [[path|alias]]. The alias is the
# humanized form of the slug (see _humanize_slug in worker/digest.py),
# so "defer-simi" → "Defer simi".
assert "[[20-contexts/sanlam/calendar/artifacts/decisions/defer-simi|" in rendered
assert "|Defer simi]]" in rendered
# Type grouping should appear
assert "decisions (1):" in rendered
assert "action_items (1):" in rendered
Expand Down