@@ -31,7 +31,7 @@ def decorator(func):
3131from hatch .cli_hatch import (
3232 handle_mcp_configure ,
3333 parse_env_vars ,
34- parse_headers ,
34+ parse_header ,
3535 parse_host_list ,
3636)
3737from hatch .mcp_host_config .models import (
@@ -68,7 +68,7 @@ def test_configure_creates_omni_model_basic(self):
6868 args = ['server.py' ],
6969 env = None ,
7070 url = None ,
71- headers = None ,
71+ header = None ,
7272 no_backup = True ,
7373 dry_run = False ,
7474 auto_approve = False
@@ -90,7 +90,7 @@ def test_configure_creates_omni_with_env_vars(self):
9090 args = ['server.py' ],
9191 env = ['API_KEY=secret' , 'DEBUG=true' ],
9292 url = None ,
93- headers = None ,
93+ header = None ,
9494 no_backup = True ,
9595 dry_run = False ,
9696 auto_approve = False
@@ -111,7 +111,7 @@ def test_configure_creates_omni_with_headers(self):
111111 args = None ,
112112 env = None ,
113113 url = 'https://api.example.com' ,
114- headers = ['Authorization=Bearer token' , 'Content-Type=application/json' ],
114+ header = ['Authorization=Bearer token' , 'Content-Type=application/json' ],
115115 no_backup = True ,
116116 dry_run = False ,
117117 auto_approve = False
@@ -132,7 +132,7 @@ def test_configure_creates_omni_remote_server(self):
132132 args = None ,
133133 env = None ,
134134 url = 'https://api.example.com' ,
135- headers = ['Auth=token' ],
135+ header = ['Auth=token' ],
136136 no_backup = True ,
137137 dry_run = False ,
138138 auto_approve = False
@@ -154,7 +154,7 @@ def test_configure_omni_with_all_universal_fields(self):
154154 args = ['server.py' , '--port' , '8080' ],
155155 env = ['API_KEY=secret' , 'DEBUG=true' , 'LOG_LEVEL=info' ],
156156 url = None ,
157- headers = None ,
157+ header = None ,
158158 no_backup = True ,
159159 dry_run = False ,
160160 auto_approve = False
@@ -176,7 +176,7 @@ def test_configure_omni_with_optional_fields_none(self):
176176 args = ['server.py' ],
177177 env = None ,
178178 url = None ,
179- headers = None ,
179+ header = None ,
180180 no_backup = True ,
181181 dry_run = False ,
182182 auto_approve = False
@@ -202,7 +202,7 @@ def test_configure_uses_host_model_registry(self):
202202 args = ['server.py' ],
203203 env = None ,
204204 url = None ,
205- headers = None ,
205+ header = None ,
206206 no_backup = True ,
207207 dry_run = False ,
208208 auto_approve = False
@@ -224,7 +224,7 @@ def test_configure_calls_from_omni_conversion(self):
224224 args = ['server.py' ],
225225 env = None ,
226226 url = None ,
227- headers = None ,
227+ header = None ,
228228 no_backup = True ,
229229 dry_run = False ,
230230 auto_approve = False
@@ -250,7 +250,7 @@ def test_configure_passes_host_specific_model_to_manager(self):
250250 args = ['server.py' ],
251251 env = None ,
252252 url = None ,
253- headers = None ,
253+ header = None ,
254254 no_backup = True ,
255255 dry_run = False ,
256256 auto_approve = False
@@ -282,7 +282,7 @@ def test_configure_dry_run_displays_report_only(self):
282282 args = ['server.py' ],
283283 env = None ,
284284 url = None ,
285- headers = None ,
285+ header = None ,
286286 no_backup = True ,
287287 dry_run = True ,
288288 auto_approve = False
@@ -312,7 +312,7 @@ def test_configure_accepts_all_universal_fields(self):
312312 args = ['server.py' , '--port' , '8080' ],
313313 env = ['API_KEY=secret' , 'DEBUG=true' ],
314314 url = None ,
315- headers = None ,
315+ header = None ,
316316 no_backup = True ,
317317 dry_run = False ,
318318 auto_approve = False
@@ -334,7 +334,7 @@ def test_configure_multiple_env_vars(self):
334334 args = ['server.py' ],
335335 env = ['VAR1=value1' , 'VAR2=value2' , 'VAR3=value3' ],
336336 url = None ,
337- headers = None ,
337+ header = None ,
338338 no_backup = True ,
339339 dry_run = False ,
340340 auto_approve = False
@@ -359,7 +359,7 @@ def test_configure_different_hosts(self):
359359 args = ['server.py' ],
360360 env = None ,
361361 url = None ,
362- headers = None ,
362+ header = None ,
363363 no_backup = True ,
364364 dry_run = False ,
365365 auto_approve = False
@@ -383,7 +383,7 @@ def test_configure_invalid_host_type_error(self):
383383 args = ['server.py' ],
384384 env = None ,
385385 url = None ,
386- headers = None ,
386+ header = None ,
387387 no_backup = True ,
388388 dry_run = False ,
389389 auto_approve = False
@@ -404,7 +404,7 @@ def test_configure_invalid_field_value_error(self):
404404 args = None , # Must be None for remote server
405405 env = None ,
406406 url = 'not-a-url' , # Invalid URL format
407- headers = None ,
407+ header = None ,
408408 no_backup = True ,
409409 dry_run = False ,
410410 auto_approve = False
@@ -424,7 +424,7 @@ def test_configure_pydantic_validation_error_handling(self):
424424 args = ['server.py' ],
425425 env = None ,
426426 url = None ,
427- headers = ['Auth=token' ], # Headers not allowed with command
427+ header = ['Auth=token' ], # Headers not allowed with command
428428 no_backup = True ,
429429 dry_run = False ,
430430 auto_approve = False
@@ -446,7 +446,7 @@ def test_configure_missing_command_url_error(self):
446446 args = None ,
447447 env = None ,
448448 url = None ,
449- headers = None ,
449+ header = None ,
450450 no_backup = True ,
451451 dry_run = False ,
452452 auto_approve = False
@@ -476,7 +476,7 @@ def test_existing_configure_command_still_works(self):
476476 args = ['-m' , 'my_package.server' ],
477477 env = ['API_KEY=secret' ],
478478 url = None ,
479- headers = None ,
479+ header = None ,
480480 no_backup = False ,
481481 dry_run = False ,
482482 auto_approve = False
@@ -509,21 +509,21 @@ def test_parse_env_vars_empty(self):
509509 self .assertEqual (result , {})
510510
511511 @regression_test
512- def test_parse_headers_basic (self ):
512+ def test_parse_header_basic (self ):
513513 """Test parsing headers from KEY=VALUE format."""
514514 headers_list = ['Authorization=Bearer token' , 'Content-Type=application/json' ]
515- result = parse_headers (headers_list )
515+ result = parse_header (headers_list )
516516
517517 expected = {'Authorization' : 'Bearer token' , 'Content-Type' : 'application/json' }
518518 self .assertEqual (result , expected )
519519
520520 @regression_test
521- def test_parse_headers_empty (self ):
521+ def test_parse_header_empty (self ):
522522 """Test parsing empty headers list."""
523- result = parse_headers (None )
523+ result = parse_header (None )
524524 self .assertEqual (result , {})
525525
526- result = parse_headers ([])
526+ result = parse_header ([])
527527 self .assertEqual (result , {})
528528
529529
@@ -638,7 +638,7 @@ def test_claude_desktop_rejects_url_configuration(self):
638638 args = None ,
639639 env = None ,
640640 url = 'http://localhost:8080' , # Should be rejected
641- headers = None ,
641+ header = None ,
642642 no_backup = True ,
643643 dry_run = False ,
644644 auto_approve = True
@@ -663,7 +663,7 @@ def test_claude_code_rejects_url_configuration(self):
663663 args = None ,
664664 env = None ,
665665 url = 'http://localhost:8080' ,
666- headers = None ,
666+ header = None ,
667667 no_backup = True ,
668668 dry_run = False ,
669669 auto_approve = True
@@ -691,7 +691,7 @@ def test_args_quoted_string_splitting(self):
691691 args = ['-r --name aName' ], # Single string with quoted content
692692 env = None ,
693693 url = None ,
694- headers = None ,
694+ header = None ,
695695 no_backup = True ,
696696 dry_run = False ,
697697 auto_approve = False
@@ -720,7 +720,7 @@ def test_args_multiple_quoted_strings(self):
720720 args = ['-r' , '--name aName' ], # Two separate args
721721 env = None ,
722722 url = None ,
723- headers = None ,
723+ header = None ,
724724 no_backup = True ,
725725 dry_run = False ,
726726 auto_approve = False
@@ -749,7 +749,7 @@ def test_args_empty_string_handling(self):
749749 args = ['' , 'server.py' ], # Empty string should be filtered
750750 env = None ,
751751 url = None ,
752- headers = None ,
752+ header = None ,
753753 no_backup = True ,
754754 dry_run = False ,
755755 auto_approve = False
@@ -779,7 +779,7 @@ def test_args_invalid_quote_handling(self):
779779 args = ['unclosed "quote' ], # Invalid quote
780780 env = None ,
781781 url = None ,
782- headers = None ,
782+ header = None ,
783783 no_backup = True ,
784784 dry_run = False ,
785785 auto_approve = False
@@ -811,7 +811,7 @@ def test_cli_handler_signature_compatible(self):
811811 # Verify expected parameters exist
812812 expected_params = [
813813 'host' , 'server_name' , 'command' , 'args' ,
814- 'env' , 'url' , 'headers ' , 'no_backup' , 'dry_run' , 'auto_approve'
814+ 'env' , 'url' , 'header ' , 'no_backup' , 'dry_run' , 'auto_approve'
815815 ]
816816
817817 for param in expected_params :
0 commit comments