refactor tests and add new

This commit is contained in:
2025-12-06 11:55:50 +03:00
parent a2ef2652ed
commit 1d2ab6f6bb
17 changed files with 294 additions and 31 deletions
+12
View File
@@ -23,6 +23,18 @@ def test_parse_raw_command_without_flag_name_with_value():
def test_parse_raw_command_with_repeated_flag_name():
with pytest.raises(RepeatedInputFlagsException):
InputCommand.parse('ssh --host 192.168.0.3 --host 172.198.0.43')
def test_parse_raw_command_with_triple_prefix():
assert InputCommand.parse(
'ssh ---host 192.168.0.0'
).input_flags.get_flag_by_name('host') == \
InputFlag('host', input_value='192.168.0.0', prefix='---')
def test_parse_raw_command_with_unprocessed_entity():
with pytest.raises(UnprocessedInputFlagException):
InputCommand.parse('ssh --host 192.168.0.3 9977')
def test_parse_empty_raw_command():