Пример #1
0
    def test_authenticate(self):
        '''
        Testing to check if the authenticate function can sign in a user properly
        '''
        self.new_user.create_account()
        test_account = Credentials(1, "Test", "Password")
        test_account.create_account()

        found_user = Credentials.authenticate_account("Test", "Password")
        self.assertEqual(found_user.identify, test_account.identify)
Пример #2
0
def authenticate(username, passkey):
    '''
    Function responsible for signing in
    '''
    return Credentials.authenticate_account(username, passkey)