@@ -57,34 +57,13 @@ def test_status_head(base_url):
57
57
assert response .headers [header ] == get_response .headers [header ]
58
58
59
59
60
- # --------------------------------------------------------------------------------
61
- # Tests for OPTIONS
62
- # --------------------------------------------------------------------------------
63
-
64
- def test_status_options (base_url ):
65
-
66
- # Call OPTIONS
67
- url = base_url .concat ('/status' )
68
- headers = {'Origin' : 'localhost' , 'Access-Control-Request-Method' : 'GET' }
69
- response = requests .options (url , headers = headers )
70
-
71
- # Response should be successful
72
- assert response .status_code == 200
73
- assert response .text == 'OK'
74
-
75
- # Response header should list supported methods
76
- allow_string = response .headers ['access-control-allow-methods' ]
77
- allowed = sorted (allow_string .split (', ' ))
78
- assert allowed == ['DELETE' , 'GET' , 'HEAD' , 'OPTIONS' , 'PATCH' , 'POST' , 'PUT' ]
79
-
80
-
81
60
# --------------------------------------------------------------------------------
82
61
# Tests for Unsupported Methods
83
62
# --------------------------------------------------------------------------------
84
63
85
64
@pytest .mark .parametrize (
86
65
'method' ,
87
- ['DELETE' , 'PATCH' , 'POST' , 'PUT' ]
66
+ ['DELETE' , 'OPTIONS' , ' PATCH' , 'POST' , 'PUT' ]
88
67
)
89
68
def test_status_invalid_method (base_url , method ):
90
69
0 commit comments