changeset 620:5b68305a8211 pytest2

minor changes/test cleanup done in util/test_crypto
author pkumar <contactprashantat@gmail.com>
date Wed, 06 Jul 2011 16:52:47 +0530
parents b4784426e4c8
children 65922348740b
files MoinMoin/util/_tests/test_crypto.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/_tests/test_crypto.py	Mon Jul 04 15:16:56 2011 +0530
+++ b/MoinMoin/util/_tests/test_crypto.py	Wed Jul 06 16:52:47 2011 +0530
@@ -59,13 +59,13 @@
         result = crypto.valid_password(u'MoinMoin', hash_val)
         assert result
         with pytest.raises(ValueError):
-            invlid_result = crypto.valid_password("MoinMoin", '{junk_value}')
+            invalid_result = crypto.valid_password("MoinMoin", '{junk_value}')
             
 
 class TestToken(object):
     """ tests for the generated tokens """
 
-    def testvalidtoken(self):
+    def test_validtoken(self):
         """ validate the token """
         test_key, test_token = crypto.generate_token(key='MoinMoin') # having some key value
         result = crypto.valid_token(test_key, test_token)
@@ -80,13 +80,13 @@
         # changed value of the first part, should not be string
         test_token_changed = '-'.join(test_parts)
         result = crypto.valid_token(test_key, test_token_changed)
-        assert result == False
+        assert not result
 
         test_key, test_token = 'MoinMoin', 'incorrect_token'
         result = crypto.valid_token(test_key, test_token)
-        assert result == False
+        assert not result
 
-    def testcache_key(self):
+    def test_cache_key(self):
         """ The key must be different for different <kw> """
         test_kw1 = {'MoinMoin': 'value1'}
         result1 = crypto.cache_key(**test_kw1)