diff test/test_templating.py @ 5488:52cb53eedf77

reworked random number use prefer secrets module from Python 3.6+, random.SystemRandom and finally plain random
author Christof Meerwald <cmeerw@cmeerw.org>
date Sat, 04 Aug 2018 22:40:16 +0100
parents b0359a7c5b6d
children f8893e1cde0d
line wrap: on
line diff
--- a/test/test_templating.py	Sun Aug 05 11:45:43 2018 +0000
+++ b/test/test_templating.py	Sat Aug 04 22:40:16 2018 +0100
@@ -153,7 +153,7 @@
             
             if test == 'module':
                 # test the module function
-                nonce1 = anti_csrf_nonce(self, self.client, lifetime=1)
+                nonce1 = anti_csrf_nonce(self.client, lifetime=1)
                 # lifetime * 60 is the offset
                 greater_than = week_seconds - 1 * 60
             elif test == 'template':
@@ -163,7 +163,7 @@
                 greater_than = week_seconds - 5 * 60
             elif test == 'default_time':
                 # use the module function but with no lifetime
-                nonce1 = anti_csrf_nonce(self, self.client)
+                nonce1 = anti_csrf_nonce(self.client)
                 # see above for web nonce lifetime.
                 greater_than = week_seconds - 10 * 60
 

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