File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,22 @@ def test_client_config_from_env_rejects_duplicate_header_names_after_normalizati
107107 ClientConfig .from_env ()
108108
109109
110+ def test_client_config_from_env_rejects_case_insensitive_duplicate_header_names (
111+ monkeypatch ,
112+ ):
113+ monkeypatch .setenv ("HYPERBROWSER_API_KEY" , "test-key" )
114+ monkeypatch .setenv (
115+ "HYPERBROWSER_HEADERS" ,
116+ '{"X-Correlation-Id":"one","x-correlation-id":"two"}' ,
117+ )
118+
119+ with pytest .raises (
120+ HyperbrowserError ,
121+ match = "duplicate header names are not allowed after normalization" ,
122+ ):
123+ ClientConfig .from_env ()
124+
125+
110126def test_client_config_from_env_ignores_blank_headers (monkeypatch ):
111127 monkeypatch .setenv ("HYPERBROWSER_API_KEY" , "test-key" )
112128 monkeypatch .setenv ("HYPERBROWSER_HEADERS" , " " )
You can’t perform that action at this time.
0 commit comments