Buckets:
| import httpx | |
| import pytest | |
| from fastapi import status | |
| from fief.settings import settings | |
| from tests.types import TenantParams | |
| async def test_apps_auth_cors_configuration( | |
| path: str, | |
| cors_enabled: bool, | |
| tenant_params: TenantParams, | |
| test_client_auth: httpx.AsyncClient, | |
| ): | |
| response = await test_client_auth.options( | |
| f"{tenant_params.path_prefix}{path}", | |
| headers={"access-control-request-method": "GET", "origin": "bretagne.duchy"}, | |
| ) | |
| if cors_enabled: | |
| assert response.status_code == status.HTTP_200_OK | |
| assert response.headers.get("Access-Control-Allow-Origin") == "*" | |
| else: | |
| assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED | |
| async def test_invalid_locale_cookie( | |
| locale: str, tenant_params: TenantParams, test_client_auth: httpx.AsyncClient | |
| ): | |
| response = await test_client_auth.get( | |
| f"{tenant_params.path_prefix}/.well-known/openid-configuration", | |
| cookies={settings.user_locale_cookie_name: locale}, | |
| ) | |
| assert response.status_code == status.HTTP_200_OK | |
Xet Storage Details
- Size:
- 1.37 kB
- Xet hash:
- 6277df6707edefed2a1ed92e3ec012841ff6cc32ea1079d2af694194f0dfc0eb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.