def test_find_credential(self):
     '''
     test case to find credential of a particular site
     '''
     self.new_credential.save_credential()
     test_credential = Credential("anum","Instagram","anumasif","fdsf134csd")
     test_credential.save_credential()
     self.assertEqual(Credential.find_credential("Instagram"),test_credential)
Exemplo n.º 2
0
 def test_find_credential(self):
     '''
     test case to find credential of a particular site
     '''
     self.new_credential.save_credential()
     test_credential = Credential("henry", "facebook", "halkano",
                                  "fdsf134csd")
     test_credential.save_credential()
     self.assertEqual(Credential.find_credential("facebook"),
                      test_credential)
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_credentials()
        test_credential = Credential("user", "site", "pass")
        test_credential.save_credentials()

        credential = Credential.find_credential("user")

        self.assertEqual(credential.user_name, test_credential.user_name)
Exemplo n.º 4
0
def find_credential(user_name):
    """
    Function that finds a Credentials by an account name and returns the Credentials that belong to that account
    """
    return Credential.find_credential(user_name)
Exemplo n.º 5
0
def find_credential(site_name):
    """
    Function that finds a credential info of an account by company name
    """
    return Credential.find_credential(site_name)