Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
routersploit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
czos-dpend
routersploit
Commits
c11a442b
Commit
c11a442b
authored
May 13, 2016
by
Max Zinkus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit tests (added new commands in wrong order)
parent
8c6a107b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
test_completer.py
routersploit/test/test_completer.py
+0
-0
test_interpreter.py
routersploit/test/test_interpreter.py
+2
-3
No files found.
routersploit/test/test_completer.py
View file @
c11a442b
routersploit/test/test_interpreter.py
View file @
c11a442b
...
@@ -106,7 +106,6 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
...
@@ -106,7 +106,6 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
def
test_command_check_not_supported_by_module
(
self
,
print_status
):
def
test_command_check_not_supported_by_module
(
self
,
print_status
):
with
mock
.
patch
.
object
(
self
.
interpreter
.
current_module
,
'check'
)
as
mock_check
:
with
mock
.
patch
.
object
(
self
.
interpreter
.
current_module
,
'check'
)
as
mock_check
:
mock_check
.
return_value
=
None
mock_check
.
return_value
=
None
mock_check
.
assert_called_once_with
()
@mock.patch
(
'sys.exc_info'
)
@mock.patch
(
'sys.exc_info'
)
@mock.patch
(
'traceback.format_exc'
)
@mock.patch
(
'traceback.format_exc'
)
...
@@ -178,14 +177,14 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
...
@@ -178,14 +177,14 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
def
test_suggested_commands_with_loaded_module
(
self
):
def
test_suggested_commands_with_loaded_module
(
self
):
self
.
assertEqual
(
self
.
assertEqual
(
self
.
interpreter
.
suggested_commands
(),
self
.
interpreter
.
suggested_commands
(),
[
'run'
,
'back'
,
'set '
,
'show '
,
'check'
,
'ex
it'
,
'exec'
,
'help
'
]
# Extra space at the end because of following param
[
'run'
,
'back'
,
'set '
,
'show '
,
'check'
,
'ex
ec'
,
'help'
,
'exit
'
]
# 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
):
self
.
interpreter
.
current_module
=
None
self
.
interpreter
.
current_module
=
None
self
.
assertEqual
(
self
.
assertEqual
(
self
.
interpreter
.
suggested_commands
(),
# Extra space at the end because of following param
self
.
interpreter
.
suggested_commands
(),
# Extra space at the end because of following param
[
'use '
,
'ex
it'
,
'exec'
,
'help
'
]
[
'use '
,
'ex
ec'
,
'help'
,
'exit
'
]
)
)
@mock.patch
(
'importlib.import_module'
)
@mock.patch
(
'importlib.import_module'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment