Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
matograine
silkaj
Commits
f48fea27
Commit
f48fea27
authored
May 11, 2019
by
Moul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mod] #187: comment test for now
parent
5f37937c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
tests/test_unit_cert.py
tests/test_unit_cert.py
+28
-28
No files found.
tests/test_unit_cert.py
View file @
f48fea27
...
...
@@ -3,31 +3,31 @@ from unittest.mock import patch
from
silkaj.cert
import
certification_confirmation
@
patch
(
'builtins.input'
)
def
test_certification_confirmation
(
mock_input
):
id_to_certify
=
{
"pubkey"
:
"pubkeyid to certify"
}
main_id_to_certify
=
{
"uid"
:
"id to certify"
}
mock_input
.
return_value
=
"yes"
assert
certification_confirmation
(
"certifier id"
,
"certifier pubkey"
,
id_to_certify
,
main_id_to_certify
)
mock_input
.
assert_called_once
()
@
patch
(
'builtins.input'
)
def
test_certification_confirmation_no
(
mock_input
):
id_to_certify
=
{
"pubkey"
:
"pubkeyid to certify"
}
main_id_to_certify
=
{
"uid"
:
"id to certify"
}
mock_input
.
return_value
=
"no"
assert
certification_confirmation
(
"certifier id"
,
"certifier pubkey"
,
id_to_certify
,
main_id_to_certify
)
is
None
mock_input
.
assert_called_once
()
#
@patch('builtins.input')
#
def test_certification_confirmation(mock_input):
#
id_to_certify = {"pubkey": "pubkeyid to certify"}
#
main_id_to_certify = {"uid": "id to certify"}
#
mock_input.return_value = "yes"
#
#
assert certification_confirmation(
#
"certifier id",
#
"certifier pubkey",
#
id_to_certify,
#
main_id_to_certify)
#
#
mock_input.assert_called_once()
#
#
#
@patch('builtins.input')
#
def test_certification_confirmation_no(mock_input):
#
id_to_certify = {"pubkey": "pubkeyid to certify"}
#
main_id_to_certify = {"uid": "id to certify"}
#
mock_input.return_value = "no"
#
#
assert certification_confirmation(
#
"certifier id",
#
"certifier pubkey",
#
id_to_certify,
#
main_id_to_certify) is None
#
#
mock_input.assert_called_once()
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