def test_copy_email(self): ''' Test to confirm that we are copying the email address from a found credentials ''' self.new_credentials.save_credentials() Credentials.copy_credentials("*****@*****.**") self.assertEqual(self.new_credentials.email,pyperclip.paste())
def test_copy_credentials(self): """ Method that tests whether a user can copy credentials on the clipboard """ self.new_account_name.save_info() Instagram = Credentials("Instagram", "Mary", "wanjikuMburu254") Instagram.save_info() found_credentials = None for credentials in Credentials.info_details: found_credentials = Credentials.find_by_first_name( credentials.first_name) return pyperclip.copy(found_credentials.info_password) Credentials.copy_credentials(self.info_details.first_name) self.assertEqual("wanjikuMburu254", pyperclip.paste()) print(pyperclip.paste())
def test_copy_credentials(self): ''' A funtcion to test to check if the copy a credential method copies the correct credential ''' self.new_credential.save_credentials() google = Credentials("google", "Paul Wamaria", "Paul Wamaria", "*****@*****.**", "leejones2") google.save_credentials() found_credential = None for credential in Credentials.user_credentials_list: found_credential = Credentials.find_by_account_type( credential.account_type) return pyperclip.copy(found_credential.account_password) Credentials.copy_credentials(self.new_credential.account_type) self.assertEqual('leejones2', pyperclip.paste()) print(pyperclip.paste())
def copy_credentials(site_name): ''' Function to copy a credentials details to the clipboard ''' return Credentials.copy_credentials(site_name)
def copy_credentials(chosen_site): return Credentials.copy_credentials(chosen_site)
def copy_credentials(first_name): """ function that copies credentials """ return Credentials.copy_credentials(first_name)
def copy_credentials(password): ''' Copies Credentials ''' return Credentials.copy_credentials(password)