Skip to content

test(sandbox): cover default template listing - #471

Merged
miclle merged 1 commit into
qiniu:masterfrom
miclle:feat/sandbox-list-default-templates
Jul 28, 2026
Merged

test(sandbox): cover default template listing#471
miclle merged 1 commit into
qiniu:masterfrom
miclle:feat/sandbox-list-default-templates

Conversation

@miclle

@miclle miclle commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add success, API error, and camelCase alias coverage for list_default_templates
  • add a live integration test for the default-template endpoint
  • add a read-only default-template example and extend the existing template example

Background

SandboxClient.list_default_templates() already exposes GET /default-templates, but the public behavior lacked direct unit coverage, live integration validation, and a focused read-only example. This aligns the Python SDK verification surface with qiniu/go-sdk#230.

Validation

  • flake8 --show-source --max-line-length=160 ./qiniu
  • flake8 --show-source --max-line-length=160 on the changed examples and tests
  • Sandbox unit tests: 147 passed
  • CI public test selection with the mock server: 215 passed
  • root .env live integration test: passed
  • root .env read-only example: returned 8 default templates
  • git diff --check

Add unit and live integration coverage for the existing default-template endpoint. Include read-only examples that load credentials from the project .env file.
@qiniu-prow qiniu-prow Bot added the size/L label Jul 28, 2026
@miclle
miclle marked this pull request as ready for review July 28, 2026 09:14

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found in the changed tests and examples. The new unit coverage matches the existing SandboxClient.list_default_templates() behavior, and the integration/example additions are consistent with nearby sandbox conventions.

Validation: changed files compile successfully with python -m py_compile, and git diff --check passes. The focused pytest suite was not run because pytest is not installed in this workspace.

@miclle
miclle merged commit ce865be into qiniu:master Jul 28, 2026
6 of 7 checks passed
@miclle
miclle deleted the feat/sandbox-list-default-templates branch July 28, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant