Conversation
Added a comprehensive test suite for `enapter.http.api.blueprints.Client` covering get, upload (data/file/directory), download, and validation methods. Mocks `httpx.AsyncClient` responses to verify request structures and data parsing without making external network requests. Co-authored-by: rnovatorov <20299819+rnovatorov@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Added a comprehensive test suite for `enapter.http.api.blueprints.Client` covering get, upload (data/file/directory), download, and validation methods. Mocks `httpx.AsyncClient` responses to verify request structures and data parsing without making external network requests. Also formats with `black`. Co-authored-by: rnovatorov <20299819+rnovatorov@users.noreply.github.com>
Removed unused `pathlib` import from `tests/unit/test_http/test_api/test_blueprints/test_client.py` which was causing the CI check (`make lint-pyflakes`) to fail. Co-authored-by: rnovatorov <20299819+rnovatorov@users.noreply.github.com>
|
Superseded by #44. |
🎯 What: The testing gap addressed
Added a complete unit test suite for the
enapter.http.api.blueprints.Clientclass, addressing the testing gap where blueprint HTTP API interactions were unverified.📊 Coverage: What scenarios are now tested
get: Retrieval of blueprints by ID and parsing of the response DTO intoBlueprintobjects.upload: Uploading raw data.upload_file: Reading and uploading a blueprint file from disk.upload_directory: Zipping and uploading an entire blueprint directory from disk.download: Requesting and receiving blueprint zip payloads correctly usingBlueprintViewparameters.validate: Validation of raw data, files, and directories, including failure flows raisingMultiErrorfor validation mistakes.✨ Result: The improvement in test coverage
Ensures all HTTP interactions with the blueprint API correctly format requests (endpoints, query parameters, zip content) and appropriately parse successful JSON responses and error states, significantly increasing reliability of the HTTP client layer.
PR created automatically by Jules for task 11478884611788668833 started by @rnovatorov