Skip to content

Commit e709849

Browse files
committed
minor fix to Fast_API.client method, to support passing params directly to the TestClient ctor (so that for example we can configure auth headers)
1 parent 78e891f commit e709849

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

osbot_fast_api/api/Fast_API.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def app_kwargs(self, **kwargs):
102102
def app_router(self):
103103
return self.app().router
104104

105-
def client(self):
105+
def client(self, **kwargs):
106106
from starlette.testclient import TestClient # moved here for performance reasons
107-
return TestClient(self.app())
107+
return TestClient(self.app(), **kwargs)
108108

109109
def config__no_default_routes(self): self.config.default_routes = False ; return self
110110
def config__no_api_key (self): self.config.enable_api_key = False ; return self

0 commit comments

Comments
 (0)