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