예제 #1
0
 def test_find_site(self):
     '''
     Methode to find by site name and retun the correct credentials
     '''
     self.new_credential.save_credential()
     twitter = Credential("Deborah", "Twitter", "Debby07", "Ingabineza")
     twitter.save_credential()
     credential_exists = Credential.find_site('Twitter')
     self.assertEqual(credential_exists, twitter)
예제 #2
0
 def test_find_site(self):
     '''
     Methode to find by site name and retun the correct credentials
     '''
     self.new_credential.save_credential()
     twitter = Credential("jeanne", "Twitter", "dukunde", "dukunde")
     twitter.save_credential()
     credential_exists = Credential.find_site('Twitter')
     self.assertEqual(credential_exists, twitter)
예제 #3
0
    def test_copy(self):
        '''
        Methode to copy the credential and save them
        '''

        self.new_credential.save_credential()
        twitter = Credential("jeanne", "Twitter", "dukunde", "dukunde")
        twitter.save_credential()
        find_credential = None
        for credential in Credential.user_credential_list:

            find_credential = Credential.find_site(credential.site_name)
            return pyperclip.copy(find_credential.password)

        Credential.copy_credential(self.new_credential.site_name)
        self.assertEqual('dukunde', pyperclip.paste())
        print(pyperclip.paste())