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

Add plain test for the original diceware list.

The original diceware list (with 7776 words) is still shipped with our
package.
parent 11d27e63
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,7 @@ class TestWordList(object):
assert list(w_list) == ["foo", "bar", "-dash-at-start", "baz"]
def test_wordlist_en_8k(self):
# we can get a list of words out of english 8k wordlist.
# we can get a list of words out of the reinhold english 8k wordlist.
en_src = os.path.join(WORDLISTS_DIR, 'wordlist_en.txt')
w_list = WordList(en_src)
long_list = list(w_list)
......@@ -232,7 +232,7 @@ class TestWordList(object):
assert len(long_list) == 8192
def test_wordlist_en_securedrop(self):
# we can get a list of words out of english 8k wordlist.
# we can get a list of words out of securedrop english 8k wordlist.
en_src = os.path.join(WORDLISTS_DIR, 'wordlist_en_securedrop.txt')
w_list = WordList(en_src)
long_list = list(w_list)
......@@ -240,6 +240,14 @@ class TestWordList(object):
assert long_list[-1] == "zurich"
assert len(long_list) == 8192
def test_wordlist_en(self):
# we can get a list of words out of the original diceware wordlist.
en_src = os.path.join(WORDLISTS_DIR, 'wordlist_en_orig.asc')
w_list = list(WordList(en_src))
assert w_list[0] == "a"
assert w_list[-1] == "@"
assert len(w_list) == 7776
def test_get_wordlist_simple(self, tmpdir):
# simple wordlists can be created
in_file = tmpdir.mkdir("work").join("mywordlist")
......
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