Commit 6a60de9d by fwkz

Testing order of suggested_commands()

parent 7e8a7a99
...@@ -254,16 +254,16 @@ class RoutersploitInterpreterTest(RoutersploitTestCase): ...@@ -254,16 +254,16 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
self.assertEqual(self.module_prompt_default('UnnamedModule'), self.interpreter.prompt) self.assertEqual(self.module_prompt_default('UnnamedModule'), self.interpreter.prompt)
def test_suggested_commands_with_loaded_module_and_no_global_value_set(self): def test_suggested_commands_with_loaded_module_and_no_global_value_set(self):
self.assertItemsEqual( self.assertEqual(
list(self.interpreter.suggested_commands()), list(self.interpreter.suggested_commands()),
['use ', 'run', 'back', 'set ', 'setg ', 'show ', 'check', 'exec ', 'help', 'exit'] # Extra space at the end because of following param ['back', 'check', 'exec ', 'exit', 'help', 'run', 'set ', 'setg ', 'show ', 'use '] # Extra space at the end because of following param
) )
def test_suggested_commands_with_loaded_module_and_global_value_set(self): def test_suggested_commands_with_loaded_module_and_global_value_set(self):
GLOBAL_OPTS['key'] = 'value' GLOBAL_OPTS['key'] = 'value'
self.assertItemsEqual( self.assertEqual(
list(self.interpreter.suggested_commands()), list(self.interpreter.suggested_commands()),
['use ', 'run', 'back', 'set ', 'setg ', 'show ', 'check', 'exec ', 'help', 'exit', 'unsetg '] # Extra space at the end because of following param ['back', 'check', 'exec ', 'exit', 'help', 'run', 'set ', 'setg ', 'show ', 'unsetg ', 'use '] # Extra space at the end because of following param
) )
def test_suggested_commands_without_loaded_module(self): def test_suggested_commands_without_loaded_module(self):
......
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