feat: double Esc to exit main menu; fix Cryptgeon test for new payload schema

- First Esc in main screen shows "Press Esc again to quit" in footer;
  second Esc exits. Any other key resets the pending state.
- Update test_posts_to_correct_endpoint to expect contents as base64 string
  and presence of meta field, matching the updated Cryptgeon API payload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad Doloman
2026-06-24 15:31:12 +03:00
parent 90af568755
commit f3e1471d1a
2 changed files with 15 additions and 2 deletions

View File

@@ -27,7 +27,8 @@ def test_posts_to_correct_endpoint(mock_open):
req = mock_open.call_args[0][0]
assert req.full_url == "https://cg.example.com/api/notes/"
body = json.loads(req.data)
assert isinstance(body["contents"], list)
assert isinstance(body["contents"], str)
assert body["meta"] == ""
assert body["views"] == 1
assert body["type"] == "text"