Skip to content

Commit c04d279

Browse files
committed
add That-Too to manual custom headers list
Signed-off-by: Varsha GS <[email protected]>
1 parent 898f277 commit c04d279

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tests/apps/fastapi_app/__init__.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,24 @@
66
from instana.log import logger
77

88
testenv["fastapi_port"] = 10816
9-
testenv["fastapi_server"] = ("http://127.0.0.1:" + str(testenv["fastapi_port"]))
9+
testenv["fastapi_server"] = "http://127.0.0.1:" + str(testenv["fastapi_port"])
10+
1011

1112
def launch_fastapi():
1213
from .app import fastapi_server
1314
from instana.singletons import agent
1415

1516
# Hack together a manual custom headers list; We'll use this in tests
16-
agent.options.extra_http_headers = [u'X-Capture-This', u'X-Capture-That', u'X-Capture-This-Too']
17+
agent.options.extra_http_headers = [
18+
"X-Capture-This",
19+
"X-Capture-That",
20+
"X-Capture-This-Too",
21+
"X-Capture-That-Too",
22+
]
1723

18-
uvicorn.run(fastapi_server, host='127.0.0.1', port=testenv['fastapi_port'], log_level="critical")
24+
uvicorn.run(
25+
fastapi_server,
26+
host="127.0.0.1",
27+
port=testenv["fastapi_port"],
28+
log_level="critical",
29+
)

0 commit comments

Comments
 (0)