Skip to content

Commit 444ec71

Browse files
committed
✅ Add tests for --proxy-headers
1 parent 3c59f57 commit 444ec71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def test_dev() -> None:
2727
"port": 8000,
2828
"reload": True,
2929
"root_path": "",
30+
"proxy_headers": True,
3031
}
3132
assert "Using import string single_file_app:app" in result.output
3233
assert (
@@ -55,6 +56,7 @@ def test_dev_args() -> None:
5556
"/api",
5657
"--app",
5758
"api",
59+
"--no-proxy-headers",
5860
],
5961
)
6062
assert result.exit_code == 0, result.output
@@ -66,6 +68,7 @@ def test_dev_args() -> None:
6668
"port": 8080,
6769
"reload": False,
6870
"root_path": "/api",
71+
"proxy_headers": False,
6972
}
7073
assert "Using import string single_file_app:api" in result.output
7174
assert (
@@ -90,6 +93,7 @@ def test_run() -> None:
9093
"port": 8000,
9194
"reload": False,
9295
"root_path": "",
96+
"proxy_headers": True,
9397
}
9498
assert "Using import string single_file_app:app" in result.output
9599
assert (
@@ -118,6 +122,7 @@ def test_run_args() -> None:
118122
"/api",
119123
"--app",
120124
"api",
125+
"--no-proxy-headers",
121126
],
122127
)
123128
assert result.exit_code == 0, result.output
@@ -129,6 +134,7 @@ def test_run_args() -> None:
129134
"port": 8080,
130135
"reload": False,
131136
"root_path": "/api",
137+
"proxy_headers": False,
132138
}
133139
assert "Using import string single_file_app:api" in result.output
134140
assert (

0 commit comments

Comments
 (0)