Skip to content

[Docs] AttributeError: 'async_generator' object has no attribute 'test_client' #335

Open
@john0isaac

Description

@john0isaac

Reproduce

Follow the testing part of the documentation:
https://pgjones.gitlab.io/quart/how_to_guides/startup_shutdown.html#testing

AttributeError: 'async_generator' object has no attribute 'test_client'

The app fixture is not created as an async fixture which results in breaking the second part of the documentation where we attempt to access the test_client() it gives an async_generator.

Expected

The tests work successfully and I don't receive an async generator error
Environment:

  • Python version:3.12.2
  • Quart version:0.19.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions