Skip to content

Commit 45b1235

Browse files
committed
Fix context test cases
1 parent 7570402 commit 45b1235

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

aikido_zen/context/init_test.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def test_wsgi_context_1():
5252
"source": "django",
5353
"method": "POST",
5454
"headers": {
55-
"HEADER_1": "header 1 value",
56-
"HEADER_2": "Header 2 value",
57-
"COOKIE": "sessionId=abc123xyz456;",
58-
"HOST": "example.com",
59-
"CONTENT_TYPE": "application/x-www-form-urlencoded",
55+
"HEADER_1": ["header 1 value"],
56+
"HEADER_2": ["Header 2 value"],
57+
"COOKIE": ["sessionId=abc123xyz456;"],
58+
"HOST": ["example.com"],
59+
"CONTENT_TYPE": ["application/x-www-form-urlencoded"],
6060
},
6161
"cookies": {"sessionId": "abc123xyz456"},
6262
"url": "https://example.com/hello",
@@ -81,12 +81,12 @@ def test_wsgi_context_2():
8181
"source": "flask",
8282
"method": "GET",
8383
"headers": {
84-
"HEADER_1": "header 1 value",
85-
"HEADER_2": "Header 2 value",
86-
"COOKIE": "sessionId=abc123xyz456;",
87-
"HOST": "localhost:8080",
88-
"CONTENT_TYPE": "application/json",
89-
"USER_AGENT": "Mozilla/5.0",
84+
"HEADER_1": ["header 1 value"],
85+
"HEADER_2": ["Header 2 value"],
86+
"COOKIE": ["sessionId=abc123xyz456;"],
87+
"HOST": ["localhost:8080"],
88+
"CONTENT_TYPE": ["application/json"],
89+
"USER_AGENT": ["Mozilla/5.0"],
9090
},
9191
"cookies": {"sessionId": "abc123xyz456"},
9292
"url": "http://localhost:8080/hello",
@@ -129,12 +129,12 @@ def test_context_is_picklable(mocker):
129129
assert unpickled_obj.url == "http://localhost:8080/hello"
130130
assert unpickled_obj.body == 123
131131
assert unpickled_obj.headers == {
132-
"HEADER_1": "header 1 value",
133-
"HEADER_2": "Header 2 value",
134-
"COOKIE": "sessionId=abc123xyz456;",
135-
"HOST": "localhost:8080",
136-
"CONTENT_TYPE": "application/json",
137-
"USER_AGENT": "Mozilla/5.0",
132+
"HEADER_1": ["header 1 value"],
133+
"HEADER_2": ["Header 2 value"],
134+
"COOKIE": ["sessionId=abc123xyz456;"],
135+
"HOST": ["localhost:8080"],
136+
"CONTENT_TYPE": ["application/json"],
137+
"USER_AGENT": ["Mozilla/5.0"],
138138
}
139139
assert unpickled_obj.query == {"user": ["JohnDoe"], "age": ["30", "35"]}
140140
assert unpickled_obj.cookies == {"sessionId": "abc123xyz456"}

0 commit comments

Comments
 (0)