Пример #1
0
def test_copy_credential(self):
    '''
        test to check if credentials have been copied
        '''
    self.new_credential.save_credential()
    Credential.copy_credential("test@user")
    self.assertEqual(self.new_credential.email, pyperclip.paste())
Пример #2
0
    def test_copy_credential(self):
        '''
        Test to confirm that we can copy the credentials to clipboard nad paste it elsewhere
        '''

        self.new_credential.save_credential()
        Credential.copy_credential("Twitter")

        self.assertEqual(self.new_credential.password, pyperclip.paste())
Пример #3
0
 def test_copy_credential(self):
     '''
     Test case to test if the copy credential function copies the correct credential.
     '''
     self.new_credential.save_credential()
     youtube = Credential('Machel', 'youtube', 'jkl54')
     youtube.save_credential()
     find_credential = None
     for credential in Credential.credential_list:
         find_credential = Credential.find_by_sitename(credential.sitename)
         return pyperclip.copy(find_credential.password)
     Credential.copy_credential(self.new_credential.sitename)
     self.assertEqual('jkl54', pyperclip.paste())
     print(pyperclip.paste())
Пример #4
0
 def test_copy_credential(self):
     '''
     Test to check if copy credential method works
     '''
     self.new_credential.save_credential()
     twitter_credential = Credential("Jane","Twitter","*****@*****.**","Pass2019")
     twitter_credential.save_credential()
     find_credential = None
     for credential in Credential.credentials_list:
         find_credential = Credential.find_by_acc_name(credential.acc_name)
         return pyperclip.copy(find_credential.acc_password)
     Credential.copy_credential(self.new_credential.acc_name)
     self.assertEqual("Pass2019",pyperclip.paste())
     print(pyperclip.paste())
Пример #5
0
 def test_copy_credential(self):
     '''
     Test to check if the copy a credential method copies the correct credential
     '''
     self.new_credential.save_credentials()
     twitter = Credential('Chris','Twitter','will','pwd123456')
     twitter.save_credentials()
     find_credential = None
     for credential in Credential.user_credentials_list:
             find_credential =Credential.find_by_site_name(credential.site_name)
             return pyperclip.copy(find_credential.password)
     Credential.copy_credential(self.new_credential.site_name)
     self.assertEqual('pwd123456',pyperclip.paste())
     print(pyperclip.paste())
 def test_copy_credential(self):
     '''
     Test case to test if the copy credential function copies the correct credential.
     '''
     self.new_credential.save_credential()
     facebook = Credential("Zashy", "facebook", "zashy12345")
     facebook.save_credential()
     find_credential = None
     for credential in Credential.credential_list:
         find_credential = Credential.find_by_sitename(credential.sitename)
         return pyperclip.copy(find_credential.password)
     Credential.copy_credential(self.new_credential.sitename)
     self.assertEqual("zashy12345", pyperclip.paste())
     print(pyperclip.paste())
Пример #7
0
def test_copy_credential(self):
    '''
    Test to check if copy credential method copies the correct credential
    '''
    self.new_credential.save_credentials()
    twitter = Credential('user','fb','715385641')
    twitter.save_credentials()
    find_credential = None
    for credential in Credential.user_credentials_list:
        find_credential = Credential.find_by_site_name(credential.site_name)
        return pyperclip.copy(find_credential.password)
    Credential.copy_credential(self.new_credential.user_name)
    self.assertEqual('715385641',pyperclip.paste())
    print(pyperclip.paste())
 def test_copy_credential(self):
     '''
     Test to confirm that we are copying the account name from a found credential
     '''
     self.new_credential.save_credential()
     facebook = Credential("Bobby", "facebook", "bobbyjoe",
                           "bobby001")  #new credential
     facebook.save_credential()
     find_credential = None
     for credential in Credential.credentials_list:
         find_credential = Credential.find_by_site_name(
             credential.site_name)
         return pyperclip.copy(find_credential.password)
     Credential.copy_credential(self.new_credential.site_name)
     self.assertEqual("bobby001", pyperclip.paste())
Пример #9
0
    def test_copy_credential(self):
        '''
        Test to show whether copy_credential method copies credential correctly
        '''

        self.new_credential.save_credentials()
        twitter = Credential("Badar", "Twitter", "badar", "badar124")
        twitter.save_credentials()
        find_credential = None
        for credential in Credential.user_credentials_list:
            find_credential = Credential.find_by_media_site(
                credential.media_site)
            return pyperclip.copy(find_credential.password)
        Credential.copy_credential(self.new_credential.media_site)
        self.assertEqual("badar124", pyperclip.paste())
        print(pyperclip.paste())
Пример #10
0
def copy_credential(site_name):
    '''
    Function to copy a credentials details to the clipboard
    '''
    return Credential.copy_credential(site_name)
Пример #11
0
def copy_credential(media_site):
    '''
    function to copy a credential on the clipboard
    '''

    return Credential.copy_credential(media_site)
Пример #12
0
def copy_credential(sitename):
    '''
    Function that copies credentials details to the clipborad.
    '''
    return Credential.copy_credential(sitename)
Пример #13
0
def copy_credential(acc_name):
    '''
    function to copy a credential details to the clipboard
    '''
    return Credential.copy_credential(acc_name)
Пример #14
0
def copy_credential(account):
    """
    A funct that copies the password using the pyperclip framework
    """
    return Credential.copy_credential(account)