From: Gregor Dschung Date: Sat, 29 Jan 2022 12:53:08 +0000 (+0100) Subject: Add test for alternating case X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=19adeba1c3162b3154a37fd1f89214ba80811b5e;p=redacted-XKCD-password-generator.git Add test for alternating case --- diff --git a/tests/test_xkcdpass.py b/tests/test_xkcdpass.py index 85cddb9..529455b 100644 --- a/tests/test_xkcdpass.py +++ b/tests/test_xkcdpass.py @@ -75,6 +75,7 @@ class XkcdPasswordTests(unittest.TestCase): self.assertTrue(all(word.isupper() for word in results["upper"])) self.assertTrue(all(word.istitle() for word in results["first"])) self.assertTrue(all(word.istitle() for word in results["capitalize"])) + self.assertEqual(results["alternating"], ["THIS", "is", "ONLY", "a", "GREAT", "test"]) # Test that the words have been correctly uppered randomly. expected_random_result_1_py3 = ['THIS', 'IS', 'ONLY', 'a', 'GREAT', 'test'] expected_random_result_2_py3 = ['THIS', 'IS', 'a', 'test', 'ALSO', 'GREAT']