From f0430ea5c3fea74247668dc75fe834cb939ff120 Mon Sep 17 00:00:00 2001 From: ulif <uli@gnufix.de> Date: Sat, 25 Jul 2015 23:09:51 +0200 Subject: [PATCH] Add test: can parse wordlist from diceware.com. --- tests/test_wordlist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_wordlist.py b/tests/test_wordlist.py index d9fd16f..9ae3331 100644 --- a/tests/test_wordlist.py +++ b/tests/test_wordlist.py @@ -61,6 +61,14 @@ class Test_GetSignedWordList(object): result = get_signed_wordlist(fd) assert ["foo", "bar", "-dash-at-start", "baz"] == result + def test_get_signed_wordlist_handles_en_orig(self, tmpdir): + # we can process the original diceware list from diceware.com + wlist_path = os.path.join(WORDLISTS_DIR, 'wordlist_en_orig.asc') + with open(wlist_path, 'r') as fd: + result = get_signed_wordlist(fd) + assert "11111\ta" == result[0] + assert "66666\t@" == result[-1] + class TestWordlistModule(object): -- GitLab