コード例 #1
0
ファイル: utils.py プロジェクト: ericmoritz/flask-auth
    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)
コード例 #2
0
ファイル: utils.py プロジェクト: cundi/flask-auth
    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)
コード例 #3
0
ファイル: utils.py プロジェクト: ericmoritz/flask-auth
 def test_encodepassword(self):
     result = utils.encode_password("password")
     
     self.assertTrue(utils.check_password("password", result))
コード例 #4
0
ファイル: utils.py プロジェクト: cundi/flask-auth
    def test_encodepassword(self):
        result = utils.encode_password("password")

        self.assertTrue(utils.check_password("password", result))
コード例 #5
0
 def set_password(self, password):
     self.password = utils.encode_password(password)
コード例 #6
0
ファイル: mongoengine_auth.py プロジェクト: cundi/flask-auth
 def set_password(self, password):
     self.password = utils.encode_password(password)