Skip to content

Commit 6f6c1f9

Browse files
committed
request_handler test cases now use new Headers class
1 parent 15d4cd7 commit 6f6c1f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aikido_zen/sources/functions/request_handler_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .request_handler import request_handler
55
from ...background_process.service_config import ServiceConfig
66
from ...context import Context, current_context
7+
from ...helpers.headers import Headers
78

89

910
@pytest.fixture
@@ -107,13 +108,15 @@ def test_post_response_no_context(mock_get_comms):
107108

108109
# Test firewall lists
109110
def set_context(remote_address, user_agent=""):
111+
headers = Headers()
112+
headers.store_header("USER_AGENT", user_agent)
110113
Context(
111114
context_obj={
112115
"remote_address": remote_address,
113116
"method": "POST",
114117
"url": "http://localhost:4000",
115118
"query": {"abc": "def"},
116-
"headers": {"USER_AGENT": user_agent},
119+
"headers": headers,
117120
"body": None,
118121
"cookies": {},
119122
"source": "flask",

0 commit comments

Comments
 (0)