Exemplo n.º 1
0
    def test_find_credentialr(self):

        self.new_credential.save_details()
        test_credential = Credentials("Twitter", "silassakwa", "xxxcvdfg")
        test_credential.save_details()

        the_credential = Credentials.find_credential("Twitter")

        self.assertEqual(the_credential.account, test_credential.account)
Exemplo n.º 2
0
    def test_find_credential(self):
        '''
        Tests whether a user can find a credential based on a username
        '''
        test_credential = Credentials("Virginia", "facebook", "virgyperry")
        Credentials.saved_credential(test_credential)

        self.assertEqual(
            Credentials.find_credential("Virginia").username,
            test_credential.username)
Exemplo n.º 3
0
    def test_find_credential(self):
        """
        test to check if we can find a credential entry by account name and display the details of the credential
        """
        self.new_credential.save_details()
        test_credential = Credentials("Twitter","Jorim","Ikrsqqfm") 
        test_credential.save_details()

        the_credential = Credentials.find_credential("Twitter")

        self.assertEqual(the_credential.account,test_credential.account)
Exemplo n.º 4
0
    def test_find_credentialr(self):
        """
        test to check if we can find a credential entry by account name and display the details of the credential
        """
        self.new_credential.save_details()
        test_credential = Credentials("Twitter", "ericmbagaya", "Mfh45hfk")
        test_credential.save_details()

        the_credential = Credentials.find_credential("Twitter")

        self.assertEqual(the_credential.account, test_credential.account)
Exemplo n.º 5
0
    def test_find_credentials(self):
        """
        test to check if we can find a credential entry by account name and display the details of the credential
        """
        self.new_credential.save_credentials()
        test_credential = Credentials("Twitter", "Macharia", "2017kare")
        test_credential.save_credentials()

        the_credential = Credentials.find_credential("Twitter")

        self.assertEqual(the_credential.account, test_credential.account)
Exemplo n.º 6
0
def find_credential(account):
    """
    Function that finds a Credentials by an account name and returns the Credentials that belong to that account
    """
    return Credentials.find_credential(account)
Exemplo n.º 7
0
def find_credential(account):

    return Credentials.find_credential(account)
Exemplo n.º 8
0
def find_credential(username):
    '''
  Looks for a credential based on its username
  '''
    return Credentials.find_credential(username)