Exemple #1
0
    def test_find_credential(self):
        """
        test to check if we can find a credential entry by username and display the details of the credential
        """
        self.new_credential.save_credentials()
        test_credential = Credential("Yahoo", "RaheBrhane", "Rahel45xs")
        test_credential.save_credentials()

        username_credential = Credential.find_credential("RaheBrhane")
        self.assertEqual(username_credential.username,
                         test_credential.username)
Exemple #2
0
def find_credential(username):
    """
    Function that finds a Credentials by an user name and returns the Credentials that belong to that account
    """
    return Credential.find_credential(username)