这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@kemingy
Copy link
Member

@kemingy kemingy commented Sep 17, 2025

Signed-off-by: Keming <kemingy94@gmail.com>
@kemingy kemingy requested a review from Copilot September 17, 2025 08:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes Quart async test issues by properly handling async/await patterns in test code and refactoring plugin architecture to support async response validation.

  • Converts Quart test functions from sync to async and replaces asyncio.run() calls with proper await statements
  • Refactors response validation logic from WerkzeugPlugin to framework-specific implementations in Flask and Quart plugins
  • Adds proper async support for Quart response validation with await calls for response data access

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_plugin_quart.py Adds imports for async tests and fixes operator precedence with parentheses
tests/quart_imports/dry_plugin_quart.py Converts all test functions to async and replaces asyncio.run() with await
tests/conftest.py Adds anyio_backend fixture for async test support
spectree/plugins/werkzeug_utils.py Removes validate_response method to be implemented in specific plugins
spectree/plugins/quart_plugin.py Adds async validate_response method with proper await calls
spectree/plugins/flask_plugin.py Adds sync validate_response method moved from WerkzeugPlugin
pyproject.toml Updates version and dependencies
pylock.toml Updates lock file dependencies
pylock.legacy.toml Updates legacy lock file dependencies
examples/quart_demo.py Minor example code update
examples/flask_demo.py Minor example code update

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Keming <kemingy94@gmail.com>
@kemingy kemingy merged commit 4460535 into 0b01001001:main Sep 17, 2025
9 checks passed
@kemingy kemingy deleted the quart_test branch September 17, 2025 08:39
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.

bug: Quart, TypeError: The response value type (coroutine) is not valid

1 participant