1
+ from __future__ import annotations
2
+
1
3
import sys
2
- from typing import Dict , List
3
4
4
5
import pytest
5
6
from fastapi import FastAPI
@@ -14,7 +15,7 @@ class TestCors:
14
15
[Starlette CORS docs](https://www.starlette.io/middleware/#corsmiddleware).
15
16
"""
16
17
17
- origins : Dict [str , List [str ]] = {
18
+ origins : dict [str , list [str ]] = {
18
19
"allowed" : [
19
20
"http://br3ndon.land" ,
20
21
"https://br3ndon.land" ,
@@ -38,7 +39,7 @@ def test_cors_preflight_response_allowed(
38
39
self , allowed_origin : str , client : TestClient
39
40
) -> None :
40
41
"""Test pre-flight response to cross-origin request from allowed origin."""
41
- headers : Dict [str , str ] = {
42
+ headers : dict [str , str ] = {
42
43
"Origin" : allowed_origin ,
43
44
"Access-Control-Request-Method" : "GET" ,
44
45
"Access-Control-Request-Headers" : "X-Example" ,
@@ -54,7 +55,7 @@ def test_cors_preflight_response_disallowed(
54
55
self , disallowed_origin : str , client : TestClient
55
56
) -> None :
56
57
"""Test pre-flight response to cross-origin request from disallowed origin."""
57
- headers : Dict [str , str ] = {
58
+ headers : dict [str , str ] = {
58
59
"Origin" : disallowed_origin ,
59
60
"Access-Control-Request-Method" : "GET" ,
60
61
"Access-Control-Request-Headers" : "X-Example" ,
0 commit comments