Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
c8d00f7c
Commit
c8d00f7c
authored
May 20, 2013
by
Michal 'vorner' Vaner
Browse files
[2937] Minor tweaks
Comments, unused values, etc.
parent
76b4abce
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/usermgr/tests/b10-cmdctl-usermgr_test.py
View file @
c8d00f7c
...
...
@@ -133,6 +133,8 @@ class TestUserMgr(unittest.TestCase):
May be None, in which case the check is skipped.
expected_stderr, (multiline) string that is checked against stderr.
May be None, in which case the check is skipped.
Returns the standard output and error captured to a string.
"""
(
returncode
,
stdout
,
stderr
)
=
run
(
command
)
if
expected_stderr
is
not
None
:
...
...
@@ -140,7 +142,7 @@ class TestUserMgr(unittest.TestCase):
if
expected_stdout
is
not
None
:
self
.
assertEqual
(
expected_stdout
,
stdout
.
decode
())
self
.
assertEqual
(
expected_returncode
,
returncode
,
" "
.
join
(
command
))
return
(
returncode
,
stdout
.
decode
(),
stderr
.
decode
())
return
(
stdout
.
decode
(),
stderr
.
decode
())
def
test_help
(
self
):
self
.
run_check
(
0
,
...
...
@@ -473,12 +475,15 @@ Options:
# So we need to check the output in a little more complex way.
# We ask the run_check not to check the output and check it
# ourselves.
(
returncode
,
stdout
,
stderr
)
=
self
.
run_check
(
2
,
None
,
(
stdout
,
stderr
)
=
self
.
run_check
(
2
,
None
,
''
,
[
self
.
TOOL
,
'-f'
,
self
.
OUTPUT_FILE
,
'add'
,
'user1'
,
'pass1'
])
# This looks little bit awkward, but is probably easiest with
# just 2 known possibilities. If there are more, we'll have to
# think of something else.
self
.
assertTrue
(
stdout
==
'Using accounts file: test_users.csv
\n
'
'Error parsing csv file: newline inside string
\n
'
or
...
...
Write
Preview
Supports
Markdown
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