Expands the unit tests in tests/test_chunker.py to cover additional functions within the sunholo.chunker module, ensuring comprehensive testing and self-containment.
Adds tests for send_doc_to_docstore: Mocks external calls and verifies the function's ability to process documents and return expected identifiers and processed documents.
Introduces tests for create_big_doc: Validates the function's capability to merge document contents and metadata correctly, ensuring the creation of a 'big document' from multiple smaller ones.
Implements tests for summarise_docs: Uses mocking to test the summarization logic, checking that summaries are correctly generated for given documents.
Adds tests for upload_doc_images: Ensures the function correctly uploads images to a specified bucket and modifies the metadata accordingly, including the removal of the image_base64 key and setting the uploaded_to_bucket flag to true.
Expands the unit tests in
tests/test_chunker.py
to cover additional functions within thesunholo.chunker
module, ensuring comprehensive testing and self-containment.send_doc_to_docstore
: Mocks external calls and verifies the function's ability to process documents and return expected identifiers and processed documents.create_big_doc
: Validates the function's capability to merge document contents and metadata correctly, ensuring the creation of a 'big document' from multiple smaller ones.summarise_docs
: Uses mocking to test the summarization logic, checking that summaries are correctly generated for given documents.upload_doc_images
: Ensures the function correctly uploads images to a specified bucket and modifies the metadata accordingly, including the removal of theimage_base64
key and setting theuploaded_to_bucket
flag to true.For more details, open the Copilot Workspace session.
Summary:
Expands unit tests for the
chunker
module, enhancing test coverage for document processing and handling functions.Key points:
tests/test_chunker.py
forsend_doc_to_docstore
,create_big_doc
,summarise_docs
, andupload_doc_images
.Generated with :heart: by ellipsis.dev