Skip to content

Commit

Permalink
Allow kwargs to be passed to the test client
Browse files Browse the repository at this point in the history
This matches the Flask API (and the test_cli_runner API).
  • Loading branch information
pgjones committed Apr 1, 2024
1 parent 2ed6f87 commit 4ccc1ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/quart/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@ def run_task(

return serve(self, config, shutdown_trigger=shutdown_trigger)

def test_client(self, use_cookies: bool = True) -> TestClientProtocol:
def test_client(self, use_cookies: bool = True, **kwargs: Any) -> TestClientProtocol:
"""Creates and returns a test client."""
return self.test_client_class(self, use_cookies=use_cookies)
return self.test_client_class(self, use_cookies=use_cookies, **kwargs)

def test_cli_runner(self, **kwargs: Any) -> QuartCliRunner:
"""Creates and returns a CLI test runner."""
Expand Down

0 comments on commit 4ccc1ea

Please sign in to comment.