예제 #1
0
 def test_encrypt(self):
     self.assertEqual(
         password._format_content(password=u'hunter42',
                                  salt=u'87654321',
                                  encrypt='pbkdf2_sha256'),
         u'hunter42 salt=87654321')
예제 #2
0
 def test_no_encrypt_no_salt(self):
     self.assertEqual(
         password._format_content(password=u'hunter42',
                                  salt=None,
                                  encrypt=False), u'hunter42')
예제 #3
0
 def test_no_encrypt(self):
     self.assertEqual(
         password._format_content(password=u'hunter42',
                                  salt=u'87654321',
                                  encrypt=False), u'hunter42 salt=87654321')
예제 #4
0
 def test_encrypt(self):
     self.assertEqual(
             password._format_content(password=u'hunter42',
                                      salt=u'87654321',
                                      encrypt='pbkdf2_sha256'),
             u'hunter42 salt=87654321')
예제 #5
0
 def test_no_encrypt_no_salt(self):
     self.assertEqual(
             password._format_content(password=u'hunter42',
                                      salt=None,
                                      encrypt=False),
             u'hunter42')
예제 #6
0
 def test_no_encrypt(self):
     self.assertEqual(
             password._format_content(password=u'hunter42',
                                      salt=u'87654321',
                                      encrypt=False),
             u'hunter42 salt=87654321')