more working

This commit is contained in:
2025-03-31 23:53:49 +03:00
parent 5c6fa5151a
commit cc8135b733
11 changed files with 103 additions and 104 deletions
+4 -4
View File
@@ -8,17 +8,17 @@ import unittest
class TestInputCommand(unittest.TestCase):
def test_parse_correct_raw_command(self):
self.assertEqual(InputCommand.parse_input_command('ssh --host 192.168.0.3').get_trigger(), 'ssh')
self.assertEqual(InputCommand.parse('ssh --host 192.168.0.3').get_trigger(), 'ssh')
def test_parse_raw_command_without_flag_name_with_value(self):
with self.assertRaises(UnprocessedInputFlagException):
InputCommand.parse_input_command('ssh 192.168.0.3')
InputCommand.parse('ssh 192.168.0.3')
def test_parse_raw_command_with_repeated_flag_name(self):
with self.assertRaises(RepeatedInputFlagsException):
InputCommand.parse_input_command('ssh --host 192.168.0.3 --host 172.198.0.43')
InputCommand.parse('ssh --host 192.168.0.3 --host 172.198.0.43')
def test_parse_empty_raw_command(self):
with self.assertRaises(EmptyInputCommandException):
InputCommand.parse_input_command('')
InputCommand.parse('')