From: Lowe Thiderman Date: Tue, 27 May 2014 22:34:43 +0000 (+0200) Subject: "Fix" tests X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d254ea1e8e7916a42dc47bccf3308db2fa866675;p=redacted-XKCD-password-generator.git "Fix" tests Due to the changes incurred by the packaging, the tests needed some changes as well. I've fixed those, but three tests still fail. However, I ran the tests on origin/master, and three of them were failing. I can help with that, but it's out of scope for this PR. ;) --- diff --git a/tests/xkcdp_tests.py b/tests/xkcdp_tests.py index 95fd4d0..f04e51d 100644 --- a/tests/xkcdp_tests.py +++ b/tests/xkcdp_tests.py @@ -1,12 +1,14 @@ import unittest import subprocess -import xkcd_password +from xkcdpass import xkcd_password + +WORDFILE = 'xkcdpass/static/3esl.txt' class XkcdPasswordTests(unittest.TestCase): def setUp(self): self.wordlist_full = xkcd_password.generate_wordlist( - wordfile='3esl.txt', + wordfile=WORDFILE, min_length=5, max_length=8,) self.wordlist_small = xkcd_password.generate_wordlist( @@ -29,7 +31,8 @@ class XkcdPasswordTests(unittest.TestCase): def test_commandlineCount(self): count = 5 result = subprocess.check_output( - ["python", "xkcd_password.py", "-w", "3esl.txt", "-c", str(count)]) + ["python", "xkcdpass/xkcd_password.py", "-w", WORDFILE, + "-c", str(count)]) self.assertTrue(result.count("\n"), count) def test_delim(self):