Skip to content

🧪 Add tests for the Blueprint API Client#41

Closed
rnovatorov wants to merge 3 commits intomainfrom
testing-blueprint-api-client-11478884611788668833
Closed

🧪 Add tests for the Blueprint API Client#41
rnovatorov wants to merge 3 commits intomainfrom
testing-blueprint-api-client-11478884611788668833

Conversation

@rnovatorov
Copy link
Copy Markdown
Member

🎯 What: The testing gap addressed
Added a complete unit test suite for the enapter.http.api.blueprints.Client class, 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 into Blueprint objects.
  • 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 using BlueprintView parameters.
  • validate: Validation of raw data, files, and directories, including failure flows raising MultiError for 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

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>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 2 commits April 1, 2026 11:24
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>
@rnovatorov
Copy link
Copy Markdown
Member Author

Superseded by #44.

@rnovatorov rnovatorov closed this Apr 1, 2026
@rnovatorov rnovatorov deleted the testing-blueprint-api-client-11478884611788668833 branch April 1, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant