chore(conductor): Mark track 'cluster_status_python' as complete
This commit is contained in:
18
scripts/cluster_status/tests/test_main.py
Normal file
18
scripts/cluster_status/tests/test_main.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
import cli
|
||||
import sys
|
||||
|
||||
def test_arg_parsing_default():
|
||||
"""Test that default arguments are parsed correctly."""
|
||||
with patch.object(sys, 'argv', ['cli.py']):
|
||||
args = cli.parse_args()
|
||||
assert args.consul_url is None # Should use config default later
|
||||
assert args.no_color is False
|
||||
|
||||
def test_arg_parsing_custom():
|
||||
"""Test that custom arguments are parsed correctly."""
|
||||
with patch.object(sys, 'argv', ['cli.py', '--consul-url', 'http://custom:8500', '--no-color']):
|
||||
args = cli.parse_args()
|
||||
assert args.consul_url == 'http://custom:8500'
|
||||
assert args.no_color is True
|
||||
Reference in New Issue
Block a user