diff test/test_security.py @ 6638:e1588ae185dc issue2550923_computed_property

merge from default branch. Fix travis.ci so CI builds don't error out
author John Rouillard <rouilj@ieee.org>
date Thu, 21 Apr 2022 16:54:17 -0400
parents 120b0bb05b6e
children cfdcaf8b5936
line wrap: on
line diff
--- a/test/test_security.py	Fri Oct 08 00:37:16 2021 -0400
+++ b/test/test_security.py	Thu Apr 21 16:54:17 2022 -0400
@@ -411,8 +411,15 @@
         self.assertEqual(has(uimu, 'issue', 'messages.recipients'), 1)
         self.assertEqual(has(uimu, 'issue', 'messages.recipients.username'), 1)
 
-    # roundup.password has its own built-in test, call it.
+    # roundup.password has its own built-in tests, call them.
     def test_password(self):
         roundup.password.test()
 
+        # pretend import of crypt failed
+        orig_crypt = roundup.password.crypt
+        roundup.password.crypt = None
+        with self.assertRaises(roundup.password.PasswordValueError) as ctx:
+            roundup.password.test_missing_crypt()
+        roundup.password.crypt = orig_crypt
+
 # vim: set filetype=python sts=4 sw=4 et si :

Roundup Issue Tracker: http://roundup-tracker.org/