changeset 593:b3aeaf60adcc pytest2

added test for incorrect token in testvalidtoken in test_crypto.py
author pkumar <contactprashantat@gmail.com>
date Mon, 27 Jun 2011 00:33:47 +0530
parents 60e6936eaf4c
children 069bb2764aaf
files MoinMoin/util/_tests/test_crypto.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/_tests/test_crypto.py	Mon Jun 27 00:24:26 2011 +0530
+++ b/MoinMoin/util/_tests/test_crypto.py	Mon Jun 27 00:33:47 2011 +0530
@@ -75,6 +75,10 @@
         result = crypto.valid_token(test_key, test_token)
         assert result
 
+        key, token = 'MoinMoin', 'incorrect_token'
+        result = crypto.valid_token(key, token)
+        assert result == False
+
     def testcache_key(self):
         """ The key must be different for different <kw> """
         test_kw1 = {'MoinMoin': 'value1'}