diff options
author | Xuan Son Nguyen <thichthat@gmail.com> | 2024-03-09 11:27:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-09 11:27:53 +0100 |
commit | 950ba1ab84db199f0bbdecdb2bb911f35261b321 (patch) | |
tree | e1633dcc8ed207b71d0b6c60af099ae344a0cb66 /examples/server/tests/features/steps | |
parent | e1fa9569ba8ce276bc7801a3cebdcf8b1aa116ea (diff) |
Server: reorganize some http logic (#5939)
* refactor static file handler
* use set_pre_routing_handler for validate_api_key
* merge embedding handlers
* correct http verb for endpoints
* fix embedding response
* fix test case CORS Options
* fix code style
Diffstat (limited to 'examples/server/tests/features/steps')
-rw-r--r-- | examples/server/tests/features/steps/steps.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/server/tests/features/steps/steps.py b/examples/server/tests/features/steps/steps.py index 0076f805..14204850 100644 --- a/examples/server/tests/features/steps/steps.py +++ b/examples/server/tests/features/steps/steps.py @@ -582,8 +582,9 @@ async def step_detokenize(context): @async_run_until_complete async def step_options_request(context, origin): async with aiohttp.ClientSession() as session: + headers = {'Authorization': f'Bearer {context.user_api_key}', 'Origin': origin} async with session.options(f'{context.base_url}/v1/chat/completions', - headers={"Origin": origin}) as response: + headers=headers) as response: assert response.status == 200 context.options_response = response |