Ejemplo n.º 1
0
    def test_encodepasswordrandom(self):
        "Test that the random salt works correctly"
        reload(random) # Clear the mock
        
        # Two encodings of the same password will be different because the
        # salt will be a different random set of chars
        result1 = utils.encode_password("password")
        result2 = utils.encode_password("password")

        self.assertNotEqual(result1, result2)
Ejemplo n.º 2
0
    def test_encodepasswordrandom(self):
        "Test that the random salt works correctly"
        reload(random)  # Clear the mock

        # Two encodings of the same password will be different because the
        # salt will be a different random set of chars
        result1 = utils.encode_password("password")
        result2 = utils.encode_password("password")

        self.assertNotEqual(result1, result2)
Ejemplo n.º 3
0
 def test_encodepassword(self):
     result = utils.encode_password("password")
     
     self.assertTrue(utils.check_password("password", result))
Ejemplo n.º 4
0
    def test_encodepassword(self):
        result = utils.encode_password("password")

        self.assertTrue(utils.check_password("password", result))
Ejemplo n.º 5
0
 def set_password(self, password):
     self.password = utils.encode_password(password)
Ejemplo n.º 6
0
 def set_password(self, password):
     self.password = utils.encode_password(password)