Commit b24b0bcc by jabedude Committed by Mariusz Kupidura

Add unit test for Interpreter parse_line method (#330)

parent 10e54078
......@@ -598,6 +598,11 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
with self.assertRaises(EOFError):
self.interpreter.command_exit()
def test_parse_line(self):
cmd, args = self.interpreter.parse_line("show options")
self.assertEqual(cmd, "show")
self.assertEqual(args, "options")
@mock.patch('os.system')
def test_command_exec(self, mock_system):
self.interpreter.command_exec("foo -bar")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment