Skip to content
Snippets Groups Projects
Commit 502b7190 authored by ulif's avatar ulif
Browse files

Test for specialchars passed to get_passphrase().

The former default ``1`` prevented differed from handle_options()
default (``0``). We are back at 100% test coverage now.
parent 04eb9226
No related branches found
No related tags found
No related merge requests found
......@@ -151,6 +151,15 @@ class TestDicewareModule(object):
phrase = get_passphrase(options)
assert phrase.lower() == phrase
def test_get_passphrase_specialchars(self):
# we can request special chars in passphrases
options = handle_options(args=[])
options.specials = 2
phrase = get_passphrase(options)
specials = [x for x in phrase if x in SPECIAL_CHARS]
# the 2nd special char position might be equal to 1st.
assert len(specials) > 0
def test_get_passphrase_delimiters(self):
# we can set separators
options = handle_options(args=[])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment