Back to index

moin  1.9.0~rc2
Public Member Functions
MoinMoin._tests.test_user.TestEncodePassword Class Reference

List of all members.

Public Member Functions

def testAscii
def testUnicode

Detailed Description

user: encode passwords tests

Definition at line 17 of file test_user.py.


Member Function Documentation

user: encode ascii password

Definition at line 20 of file test_user.py.

00020 
00021     def testAscii(self):
00022         """user: encode ascii password"""
00023         # u'MoinMoin' and 'MoinMoin' should be encoded to same result
00024         expected = "{SSHA}xkDIIx1I7A4gC98Vt/+UelIkTDYxMjM0NQ=="
00025 
00026         result = user.encodePassword("MoinMoin", salt='12345')
00027         assert result == expected
00028         result = user.encodePassword(u"MoinMoin", salt='12345')
00029         assert result == expected

user: encode unicode password 

Definition at line 30 of file test_user.py.

00030 
00031     def testUnicode(self):
00032         """ user: encode unicode password """
00033         result = user.encodePassword(u'סיסמה סודית בהחלט', salt='12345') # Hebrew
00034         expected = "{SSHA}YiwfeVWdVW9luqyVn8t2JivlzmUxMjM0NQ=="
00035         assert result == expected
00036 


The documentation for this class was generated from the following file: