{{ message }}
test: add PDF export endpoint coverage and run in CI (closes #72)#82
Merged
Conversation
Collaborator
models/from_dict_validation.py — add a small tests/test_from_dict_validation.py asserting message text for require_non_empty_str_fields / require_non_empty_str_field: absent key → missing required field, wrong type → invalid field. test_schema_error_message_distinguishes_missing_from_invalid covers the contract generically but not these helpers post-f846aaf.models/from_dict_validation.py:69 — expand require_truthy docstring to note falsy values (None, "", 0) are treated as missing (matches prior CliSessionMeta behavior). |
Collaborator
Author
both findings are already satisfied on the current tree
|
Collaborator
clean6378-max-it
approved these changes
May 27, 2026
wpak-ai
approved these changes
May 27, 2026
4 tasks
wpak-ai
pushed a commit
that referenced
this pull request
May 29, 2026
* feat: initial implement of changelog and versioning policy * removed: yet to be released v0.1.0 * docs: fix CHANGELOG issue refs for PDF tests and API decoupling #82 is PR for PDF export tests (issue #72), not the _-prefix rename. Reference issue #73 for decoupling API handlers from service internals.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
tests/test_pdf_export.pywith 8 Flask test-client cases forPOST /api/generate-pdf: normal markdown export, empty body defaults, unsafe title filename sanitization, empty markdown, long content, Unicode/emoji, simulated PDF engine failure (500), and malformedmarkdownpayload (500).pdf_clientfixture inconftest.pyso PDF tests do not need the fullworkspace_storagesetup.tests/test_pdf_export.pyin the CI pytest step so the new tests actually run in the matrix (previously onlytest_api_endpoints.pywas executed).Closes #72.
API note: The PDF route accepts
{ markdown, title }from the browser after client-side markdown conversion (download.js). It does not look up conversations by ID on the server; invalid tab IDs are handled by/api/workspaces/.../tabs(covered intest_api_endpoints.py). Server-side error coverage uses a mockedFPDF.outputfailure and a non-stringmarkdownfield.Test plan
python -m pytest tests/test_pdf_export.py tests/test_api_endpoints.py -vpython -m pytest tests/ -q(full suite)Summary by CodeRabbit
Tests
Chores